File: ctest_helpers.cmake

package info (click to toggle)
cmake-format 0.6.13-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,436 kB
  • sloc: python: 16,990; makefile: 14
file content (10 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
# Add a target test.<test_name> which depends on the program of the same name,
# allows us to use the build system to run a test and build all it's
# dependencies
function(add_test_target test_name)
  add_custom_target(
    test.${test_name}
    COMMAND ${test_name}
    DEPENDS ${test_name}
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endfunction()