Skip to content

Commit f53b2fa

Browse files
committed
Try again for static analysis in ctest scripts
1 parent b4540b4 commit f53b2fa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ctest-custom.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 999)
2828
# Ignore this warning generated during static analysis
2929
list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "linker input file unused because linking not done")
3030

31+
set(STATIC_ANALYSIS 0)
32+
3133
# azonenberg's dev box for testing
3234
if(${HOSTNAME} STREQUAL "havequick" )
3335
set(CTEST_SITE dev-havequick)
@@ -97,6 +99,7 @@ elseif(${HOSTNAME} MATCHES "ubuntu-lts" )
9799
elseif($ENV{ANALYZE})
98100
set(CTEST_BUILD_NAME x86_64-linux-ubuntu-26-04-llvmpipe-analysis)
99101
message(STATUS "Building for static analysis")
102+
set(STATIC_ANALYSIS 1)
100103
set(CTEST_BUILD_CONFIGURATION "DebugNoOpt")
101104
set(CONFIGURE_OPTIONS "-DBUILD_TESTING=ON" "-DANALYZE=ON")
102105
else()
@@ -169,7 +172,7 @@ ctest_configure(OPTIONS "${CONFIGURE_OPTIONS}")
169172
ctest_build(FLAGS "-j${N_PROCS}")
170173

171174
#Don't run unit tests if doing static analysis
172-
if(NOT $ENV{ANALYZE})
175+
if(NOT ${STATIC_ANALYSIS})
173176
ctest_test()
174177
endif()
175178

0 commit comments

Comments
 (0)