From aea3d6107fdeac79493f56de63632ec79d1896c2 Mon Sep 17 00:00:00 2001 From: PengZheng Date: Tue, 10 Feb 2026 16:20:02 +0800 Subject: [PATCH 1/4] Limit gcc analyzer to C. --- cmake/celix_project/CelixProject.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/celix_project/CelixProject.cmake b/cmake/celix_project/CelixProject.cmake index cec2ec133..3b24d175c 100644 --- a/cmake/celix_project/CelixProject.cmake +++ b/cmake/celix_project/CelixProject.cmake @@ -97,9 +97,10 @@ if (ENABLE_GCC_ANALYZER) "-Wno-analyzer-use-of-uninitialized-value" "-Wno-analyzer-fd-leak" "-Wno-analyzer-shift-count-negative" - ) - add_compile_options(${ANALYZER_FLAGS}) - else() + ) + + set(CMAKE_C_FLAGS "${ANALYZER_FLAGS} ${CMAKE_C_FLAGS}") + else() message(WARNING "ENABLE_GCC_ANALYZER is only supported with GCC ") endif() endif() From 3adb94741b876e768a18c0f50e5e1bf6ab0b42bf Mon Sep 17 00:00:00 2001 From: PengZheng Date: Tue, 10 Feb 2026 16:20:02 +0800 Subject: [PATCH 2/4] Limit gcc analyzer to C. --- cmake/celix_project/CelixProject.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/celix_project/CelixProject.cmake b/cmake/celix_project/CelixProject.cmake index cec2ec133..1cbd41774 100644 --- a/cmake/celix_project/CelixProject.cmake +++ b/cmake/celix_project/CelixProject.cmake @@ -97,9 +97,9 @@ if (ENABLE_GCC_ANALYZER) "-Wno-analyzer-use-of-uninitialized-value" "-Wno-analyzer-fd-leak" "-Wno-analyzer-shift-count-negative" - ) - add_compile_options(${ANALYZER_FLAGS}) - else() + ) + add_compile_options($<$:${ANALYZER_FLAGS}>) + else() message(WARNING "ENABLE_GCC_ANALYZER is only supported with GCC ") endif() endif() From 058e74572fcea9e3cf9847127cf7054915f66a57 Mon Sep 17 00:00:00 2001 From: PengZheng Date: Tue, 10 Feb 2026 16:42:38 +0800 Subject: [PATCH 3/4] Fix compilation errors. --- cmake/celix_project/CelixProject.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/celix_project/CelixProject.cmake b/cmake/celix_project/CelixProject.cmake index 1cbd41774..36a6d5d04 100644 --- a/cmake/celix_project/CelixProject.cmake +++ b/cmake/celix_project/CelixProject.cmake @@ -98,7 +98,7 @@ if (ENABLE_GCC_ANALYZER) "-Wno-analyzer-fd-leak" "-Wno-analyzer-shift-count-negative" ) - add_compile_options($<$:${ANALYZER_FLAGS}>) + add_compile_options($<$>:${ANALYZER_FLAGS}>) else() message(WARNING "ENABLE_GCC_ANALYZER is only supported with GCC ") endif() From 81f977f40fd617b1b152b0ff3ec2e32afe70e3ce Mon Sep 17 00:00:00 2001 From: PengZheng Date: Tue, 10 Feb 2026 16:47:22 +0800 Subject: [PATCH 4/4] Fix compilation errors. --- cmake/celix_project/CelixProject.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/celix_project/CelixProject.cmake b/cmake/celix_project/CelixProject.cmake index 36a6d5d04..e6f181887 100644 --- a/cmake/celix_project/CelixProject.cmake +++ b/cmake/celix_project/CelixProject.cmake @@ -98,7 +98,7 @@ if (ENABLE_GCC_ANALYZER) "-Wno-analyzer-fd-leak" "-Wno-analyzer-shift-count-negative" ) - add_compile_options($<$>:${ANALYZER_FLAGS}>) + add_compile_options("$<$:${ANALYZER_FLAGS}>") else() message(WARNING "ENABLE_GCC_ANALYZER is only supported with GCC ") endif()