Skip to content

Commit 7b0c00e

Browse files
committed
Add check for making valgrind and asan mutually exclusive.
1 parent 33abf81 commit 7b0c00e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source/tests/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ endif()
4747
# Set memory check configuration
4848
option(OPTION_TEST_MEMORYCHECK "Run tests with memory checker (valgrind)." OFF)
4949

50-
if(OPTION_TEST_MEMORYCHECK)
50+
51+
if(OPTION_TEST_MEMORYCHECK AND OPTION_BUILD_SANITIZER)
52+
message(WARNING "OPTION_TEST_MEMORYCHECK and OPTION_BUILD_SANITIZER are not compatible, disabling memcheck tests.")
53+
endif()
54+
55+
if(OPTION_TEST_MEMORYCHECK AND NOT OPTION_BUILD_SANITIZER)
5156
set(MEMORYCHECK_COMMAND_OPTIONS "${MEMORYCHECK_COMMAND_OPTIONS} --leak-check=full")
5257
set(MEMORYCHECK_COMMAND_OPTIONS "${MEMORYCHECK_COMMAND_OPTIONS} --trace-children=yes")
5358
set(MEMORYCHECK_COMMAND_OPTIONS "${MEMORYCHECK_COMMAND_OPTIONS} --show-reachable=yes")

0 commit comments

Comments
 (0)