]> git.stg.codes - stg.git/blobdiff - projects/CMakeLists.txt
Use std::lock_guard instead of STG_LOCKER.
[stg.git] / projects / CMakeLists.txt
index 3fec99f1ca474b1dae0378e75b4227f7204d32bb..39e548b12d5879344a9b52d939d38df62717345f 100644 (file)
@@ -14,4 +14,22 @@ if ( BUILD_STG )
     add_subdirectory ( stargazer )
 endif ( BUILD_STG )
 
-add_custom_target (cppcheck COMMAND /usr/bin/cppcheck --enable=all --std=c++14 ${CMAKE_SOURCE_DIR}/libs ${CMAKE_SOURCE_DIR}/projects/rscriptd ${CMAKE_SOURCE_DIR}/projects/sgauth ${CMAKE_SOURCE_DIR}/projects/sgconf ${CMAKE_SOURCE_DIR}/projects/stargazer)
+set ( LIB_DIRS ${CMAKE_SOURCE_DIR}/libs/common
+               ${CMAKE_SOURCE_DIR}/libs/conffiles
+               ${CMAKE_SOURCE_DIR}/libs/crypto
+               ${CMAKE_SOURCE_DIR}/libs/ia
+               ${CMAKE_SOURCE_DIR}/libs/logger
+               ${CMAKE_SOURCE_DIR}/libs/pinger
+               ${CMAKE_SOURCE_DIR}/libs/scriptexecuter
+               ${CMAKE_SOURCE_DIR}/libs/srvconf
+    )
+
+if (CPPCHECK_FOREIGN)
+    set ( LIB_DIRS ${LIB_DIRS}
+                   ${CMAKE_SOURCE_DIR}/libs/dotconfpp
+                   ${CMAKE_SOURCE_DIR}/libs/ibpp
+                   ${CMAKE_SOURCE_DIR}/libs/smux
+        )
+endif ()
+
+add_custom_target (cppcheck COMMAND /usr/bin/cppcheck --enable=all --std=c++17 ${LIB_DIRS} ${CMAKE_SOURCE_DIR}/projects/rscriptd ${CMAKE_SOURCE_DIR}/projects/sgauth ${CMAKE_SOURCE_DIR}/projects/sgconf ${CMAKE_SOURCE_DIR}/projects/stargazer)