"Fossies" - the Fresh Open Source Software Archive

Member "evolution-mapi-3.46.1/cmake/modules/CheckTarget.cmake" (2 Dec 2022, 678 Bytes) of package /linux/misc/evolution-mapi-3.46.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) CMake source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # CheckTarget.cmake
    2 #
    3 # Defines a custom target 'check', which gathers test programs like 'make check'
    4 # This is taken from https://cmake.org/Wiki/CMakeEmulateMakeCheck
    5 #
    6 # What you do is to call command:
    7 # add_check_test(_name)
    8 #   where _name is the name of the test, as defined by add_executable().
    9 #   Note it is a good idea to use EXCLUDE_FROM_ALL within the add_executable().
   10 
   11 include(CTest)
   12 
   13 # Disable this to not have verbose tests
   14 set(CMAKE_CTEST_COMMAND ${CMAKE_CTEST_COMMAND} -V)
   15 
   16 add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
   17 
   18 macro(add_check_test _name)
   19     add_test(NAME ${_name} COMMAND ${_name})
   20     add_dependencies(check ${_name})
   21 endmacro(add_check_test)