Skip to content
Snippets Groups Projects
Commit cfa50867 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Write disabled benchmarks info to file instead of CMake out.

See disabled-tests.log
parent e272cc36
No related branches found
No related tags found
No related merge requests found
...@@ -347,6 +347,9 @@ if( BUILD_TESTING AND NOT IS_SUBPROJECT ) ...@@ -347,6 +347,9 @@ if( BUILD_TESTING AND NOT IS_SUBPROJECT )
endif() endif()
endif() endif()
file(WRITE ${PROJECT_BINARY_DIR}/disabled-tests.log "${DISABLED_TESTS_LOG}")
unset(DISABLED_TESTS_LOG CACHE) # Don't write to CMakeCache.txt
# The configuration must be called from the source dir and not BaseLib/. # The configuration must be called from the source dir and not BaseLib/.
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BaseLib/BuildInfo.cpp.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BaseLib/BuildInfo.cpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/BaseLib/BuildInfo.cpp" @ONLY) "${CMAKE_CURRENT_BINARY_DIR}/BaseLib/BuildInfo.cpp" @ONLY)
......
...@@ -75,7 +75,7 @@ function (AddTest) ...@@ -75,7 +75,7 @@ function (AddTest)
if(${AddTest_REQUIREMENTS}) if(${AddTest_REQUIREMENTS})
# message(STATUS "Enabling test ${AddTest_NAME}.") # message(STATUS "Enabling test ${AddTest_NAME}.")
else() else()
message(STATUS "Requirement ${AddTest_REQUIREMENTS} not met! Disabling test ${AddTest_NAME}.") set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nRequirement ${AddTest_REQUIREMENTS} not met! Disabling test ${AddTest_NAME}." CACHE INTERNAL "")
return() return()
endif() endif()
...@@ -83,7 +83,7 @@ function (AddTest) ...@@ -83,7 +83,7 @@ function (AddTest)
if(TIME_TOOL_PATH) if(TIME_TOOL_PATH)
set(WRAPPER_COMMAND time) set(WRAPPER_COMMAND time)
else() else()
message(STATUS "WARNING: Disabling time wrapper for ${AddTest_NAME} as time exe was not found!") set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nDisabling time wrapper for ${AddTest_NAME} as time exe was not found!" CACHE INTERNAL "")
set(AddTest_WRAPPER_ARGS "") set(AddTest_WRAPPER_ARGS "")
endif() endif()
elseif(AddTest_WRAPPER STREQUAL "memcheck") elseif(AddTest_WRAPPER STREQUAL "memcheck")
...@@ -91,7 +91,7 @@ function (AddTest) ...@@ -91,7 +91,7 @@ function (AddTest)
set(WRAPPER_COMMAND "${VALGRIND_TOOL_PATH} --tool=memcheck --log-file=${AddTest_SOURCE_PATH}/${AddTest_NAME}_memcheck.log -v --leak-check=full --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xff") set(WRAPPER_COMMAND "${VALGRIND_TOOL_PATH} --tool=memcheck --log-file=${AddTest_SOURCE_PATH}/${AddTest_NAME}_memcheck.log -v --leak-check=full --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xff")
set(tester memcheck) set(tester memcheck)
else() else()
message(STATUS "WARNING: Disabling memcheck wrapper for ${AddTest_NAME} as memcheck exe was not found!") set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nDisabling memcheck wrapper for ${AddTest_NAME} as memcheck exe was not found!" CACHE INTERNAL "")
set(AddTest_WRAPPER_ARGS "") set(AddTest_WRAPPER_ARGS "")
endif() endif()
elseif(AddTest_WRAPPER STREQUAL "callgrind") elseif(AddTest_WRAPPER STREQUAL "callgrind")
...@@ -99,7 +99,7 @@ function (AddTest) ...@@ -99,7 +99,7 @@ function (AddTest)
set(WRAPPER_COMMAND "${VALGRIND_TOOL_PATH} --tool=callgrind --branch-sim=yes --cache-sim=yes --dump-instr=yes --collect-jumps=yes") set(WRAPPER_COMMAND "${VALGRIND_TOOL_PATH} --tool=callgrind --branch-sim=yes --cache-sim=yes --dump-instr=yes --collect-jumps=yes")
unset(tester) unset(tester)
else() else()
message(STATUS "WARNING: Disabling callgrind wrapper for ${AddTest_NAME} as callgrind exe was not found!") set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nDisabling callgrind wrapper for ${AddTest_NAME} as callgrind exe was not found!" CACHE INTERNAL "")
set(AddTest_WRAPPER_ARGS "") set(AddTest_WRAPPER_ARGS "")
endif() endif()
elseif(AddTest_WRAPPER STREQUAL "mpirun") elseif(AddTest_WRAPPER STREQUAL "mpirun")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment