arcolight commented on code in PR #7538:
URL: https://github.com/apache/ignite-3/pull/7538#discussion_r2799409659


##########
modules/platforms/cpp/CMakeLists.txt:
##########
@@ -63,6 +65,58 @@ if(ENABLE_IWYU)
     set(CMAKE_C_INCLUDE_WHAT_YOU_USE ${IWYU_PATH})
 endif()
 
+if(ENABLE_CLANG_TIDY)
+    find_program(CLANG_TIDY_BIN clang-tidy REQUIRED)
+    if(CLANG_TIDY_BIN)
+        message(STATUS "clang-tidy: ${CLANG_TIDY_BIN}")
+        set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_BIN}
+                
"--checks=-*,clang-analyzer-*,clang-analyzer-cplusplus*,bugprone*,concurrency-*,cppcoreguidelines-*,performance-*,portability-*,readability-*"
+                
"--header-filter=\"^.*(client|common|network|odbc|protocol|tuple).*\"gm"
+                "--exclude-header-filter=\"^.*(build|tests).*\"gm")
+        set(CMAKE_CXX_CLANG_TIDY_EXPORT_FIXES_DIR "clang-tidy-reports-dir")
+    else()
+        message(STATUS "clang-tidy not found!")
+    endif()
+endif()
+
+if(ENABLE_CPPCHECK)
+    find_program(CPPCHECK_BIN cppcheck REQUIRED)
+    if(CPPCHECK_BIN)
+        message(STATUS "cppcheck: ${CPPCHECK_BIN}")
+        message(STATUS "Please do not use parallel build with cppcheck 
enabled! Cppcheck writes results to the file and result might be corrupted in 
case of parallel build.")
+        set(CMAKE_CXX_CPPCHECK ${CPPCHECK_BIN} --enable=all --xml 
--xml-version=3 --output-file=cppcheck_report.xml)

Review Comment:
   output_file option works for every target, there will be separate files, not 
only one. So, this issue is not an issue actually.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to