summaryrefslogtreecommitdiff
path: root/source/test/programs/CMakeLists.txt
blob: 81332cfe0f335f342508bb97446397181a959c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
project(
  ${KIT_PROJECT}_test_programs
  VERSION 0.1.1
  DESCRIPTION "Kit test programs"
  LANGUAGES C CXX)

if(KIT_ENABLE_TESTING)
  add_executable(too_many_tests too_many_tests.c)
  target_link_libraries(too_many_tests kit_test)
  add_test(
    NAME too_many_tests_test
    COMMAND too_many_tests --quiet)
  set_tests_properties(
    too_many_tests_test
    PROPERTIES
    TIMEOUT "15")

  add_executable(too_many_assertions too_many_assertions.c)
  target_link_libraries(too_many_assertions kit_test)
  add_test(
    NAME too_many_assertions_test
    COMMAND too_many_assertions --quiet)
  set_tests_properties(
    too_many_assertions_test
    PROPERTIES
    TIMEOUT "15")

  add_executable(cpp_example cpp_example.cpp)
  target_link_libraries(cpp_example kit_test)
  add_test(
    NAME cpp_example_test
    COMMAND cpp_example --quiet)
  set_tests_properties(
    cpp_example_test
    PROPERTIES
    TIMEOUT "15")

  if(NOT MSVC)
    add_executable(signals signals.cpp)
    target_link_libraries(signals kit_test)
    add_test(
      NAME signals_test
      COMMAND signals --no-carriage-return)
    set_tests_properties(
      signals_test
      PROPERTIES
      TIMEOUT "15")
  endif()
endif()