aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/MacroAddCheckTest.cmake
blob: a13912188716872ae3a01744f1d761258da9eeb4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# - macro_add_check_test(test_name test_source linklib1 ... linklibN)

ENABLE_TESTING()
include(CTest)
set(CMAKE_C_FLAGS_PROFILING "-g -pg")

macro (MACRO_ADD_CHECK_TEST _testName _testSource)
  add_executable(${_testName} ${_testSource})
  target_link_libraries(${_testName} ${ARGN})
  get_target_property(_targetLocation ${_testName} LOCATION) 
  add_test(${_testName} ${_targetLocation})
endmacro (MACRO_ADD_CHECK_TEST)