pnoltes commented on code in PR #817:
URL: https://github.com/apache/celix/pull/817#discussion_r2733618957


##########
cmake/celix_project/CelixProject.cmake:
##########
@@ -72,6 +72,15 @@ elseif (ENABLE_THREAD_SANITIZER)
     set(CMAKE_C_FLAGS "-fsanitize=thread ${CMAKE_C_FLAGS}")
     set(CMAKE_CXX_FLAGS "-fsanitize=thread ${CMAKE_CXX_FLAGS}")
 endif()
+if (ENABLE_GCC_ANALYZER)  
+    if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")  
+        set(CMAKE_C_FLAGS "-fanalyzer ${CMAKE_C_FLAGS}")  
+        set(CMAKE_CXX_FLAGS "-fanalyzer ${CMAKE_CXX_FLAGS}")  
+    else()  
+        message(WARNING "ENABLE_GCC_ANALYZER is only supported with GCC 
compiler 10.0.0 OR higher.")  

Review Comment:
   ```suggestion
           message(WARNING "ENABLE_GCC_ANALYZER is only supported with GCC")  
   ```
   I would not mention the version, because that is not what is tested in the 
if. 



##########
conanfile.py:
##########
@@ -387,7 +388,10 @@ def generate(self):
             if "libcurl" in lst:
                 tc.cache_variables["BUILD_ERROR_INJECTOR_CURL"] = "ON"
         tc.cache_variables["CELIX_ERR_BUFFER_SIZE"] = 
str(self.options.celix_err_buffer_size)
-        # tc.cache_variables["CMAKE_PROJECT_Celix_INCLUDE"] = 
os.path.join(self.build_folder, "conan_paths.cmake")
+        if self.options.enable_gcc_analyzer and self.settings.compiler == 
"gcc":

Review Comment:
   This is not needed, the "enable_gcc_analyzer" will be available in CMake as 
`ENABLE_GCC_ANALYZER`



-- 
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