46 set(oneValueArgs REASON)
47 set(multiValueArgs TESTS)
48 cmake_parse_arguments(CAMITK_DISABLE_TESTS
"${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
50 foreach(TEST_NAME ${CAMITK_DISABLE_TESTS_TESTS})
51 # CMake < 3.9 did not have the DISABLED test property. Use WILL_FAIL instead
52 if(${CMAKE_VERSION} VERSION_LESS
"3.9")
53 set_tests_properties(${TEST_NAME} PROPERTIES WILL_FAIL
true)
55 set_tests_properties(${TEST_NAME} PROPERTIES DISABLED
true)
59 # message to the developper
60 string(REPLACE
"" " " CAMITK_DISABLE_TESTS_TESTS_STRING
"${CAMITK_DISABLE_TESTS_TESTS}")
61 set(DISABLE_MESSAGE
"Unconditionally disabling tests:\n Disabled tests: ${CAMITK_DISABLE_TESTS_TESTS_STRING}\n")
62 if(${CMAKE_VERSION} VERSION_LESS
"3.9")
63 set(DISABLE_MESSAGE ${DISABLE_MESSAGE}
" (using WILL_FAIL property because CMake < 3.9)\n")
65 set(DISABLE_MESSAGE ${DISABLE_MESSAGE}
" Reason: ${CAMITK_DISABLE_TESTS_REASON}")
66 message(STATUS ${DISABLE_MESSAGE})
cmake modules macros camitk test endif() add_custom_target(camitk-ce-iwyu COMMAND $
Definition: CamiTKIncludeWhatYouUse.h:37
iwyu out CACHE PATH Output filename for include what you use set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXECUTABLE}) if(NOT EXISTS $
Definition: CamiTKIncludeWhatYouUse.h:22
camitk_disable_tests()
camitk_disable_tests is a macro to unconditionally disable one or more tests.
Definition: CamiTKDisableTests.h:44