Skip to content

Commit 31ea9cd

Browse files
committed
Fix CMake syntax to enable memory analyzer tests
"option" requires the help text as second, not as third argument. This resulted in memory analyzer tests being disabled no matter what the OS being built on.
1 parent f649c47 commit 31ea9cd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,14 @@ function(cprover_default_properties)
182182
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CBMC_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY})
183183
endfunction()
184184

185-
option(WITH_MEMORY_ANALYZER OFF
186-
"build the memory analyzer")
187-
188185
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
189186
set(WITH_MEMORY_ANALYZER_DEFAULT ON)
190187
else()
191188
set(WITH_MEMORY_ANALYZER_DEFAULT OFF)
192189
endif()
193190

194-
option(WITH_MEMORY_ANALYZER ${WITH_MEMORY_ANALYZER_DEFAULT}
195-
"build the memory analyzer")
191+
option(WITH_MEMORY_ANALYZER
192+
"build the memory analyzer" ${WITH_MEMORY_ANALYZER_DEFAULT})
196193

197194
add_subdirectory(src)
198195
add_subdirectory(regression)

0 commit comments

Comments
 (0)