CMakeLists.txt 883 Bytes
Newer Older
1
2
3
4
5
6
7

if(BUILD_TESTING)
  
  add_executable (minimalExecutionTest  minimalExecutionTest.cc )
  
  set_target_properties (
      minimalExecutionTest PROPERTIES
8
      RUNTIME_OUTPUT_NAME "minimalExecutionTest"
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
      RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
      LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
    )
	
  if (WIN32)
    add_custom_command (TARGET minimalExecutionTest POST_BUILD
                        COMMAND ${CMAKE_COMMAND} -E
                        copy_if_different
                          ${CMAKE_BINARY_DIR}/tests/${CMAKE_CFG_INTDIR}/minimalExecutionTest.exe
                          ${CMAKE_BINARY_DIR}/tests/minimalExecutionTest.exe)
  endif()

  ADD_TEST(NAME "Minimal_Execution_Test"
           COMMAND ${CMAKE_BINARY_DIR}/tests/minimalExecutionTest )

  set_tests_properties( Minimal_Execution_Test PROPERTIES
    TIMEOUT 10
   )

endif()