This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch hotfix/limit-gcc-anayzer-C
in repository https://gitbox.apache.org/repos/asf/celix.git

commit d62160cf6136c55f7b5dd4d51b1ec67b0a311cdc
Author: PengZheng <[email protected]>
AuthorDate: Tue Feb 10 16:56:08 2026 +0800

    Limit gcc analyzer to C.
---
 cmake/celix_project/CelixProject.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/celix_project/CelixProject.cmake 
b/cmake/celix_project/CelixProject.cmake
index cec2ec133..bd7e7f29d 100644
--- a/cmake/celix_project/CelixProject.cmake
+++ b/cmake/celix_project/CelixProject.cmake
@@ -98,8 +98,8 @@ if (ENABLE_GCC_ANALYZER)
             "-Wno-analyzer-fd-leak" 
             "-Wno-analyzer-shift-count-negative"
         )  
-       add_compile_options(${ANALYZER_FLAGS})
-    else()  
+       add_compile_options("$<$<COMPILE_LANGUAGE:C>:${ANALYZER_FLAGS}>")
+    else()
         message(WARNING "ENABLE_GCC_ANALYZER is only supported with GCC ")  
     endif()  
 endif()

Reply via email to