Computer Assisted Medical Intervention Tool Kit  version 5.1
 
Loading...
Searching...
No Matches
CamiTKDisableTests.h
Go to the documentation of this file.
1
42#
45 set(options "")
46 set(oneValueArgs REASON)
47 set(multiValueArgs TESTS)
48 cmake_parse_arguments(CAMITK_DISABLE_TESTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
49
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)
54 else()
55 set_tests_properties(${TEST_NAME} PROPERTIES DISABLED true)
56 endif()
57 endforeach()
58
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")
64 endif()
65 set(DISABLE_MESSAGE ${DISABLE_MESSAGE} " Reason: ${CAMITK_DISABLE_TESTS_REASON}")
66 message(STATUS ${DISABLE_MESSAGE})
67
68end(){)
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