You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 717B

7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
123456789101112131415161718192021222324252627282930
  1. add_library(Catch INTERFACE)
  2. target_include_directories(Catch INTERFACE "catch")
  3. add_library(Trompeloeil INTERFACE)
  4. target_include_directories(Trompeloeil INTERFACE "trompeloeil")
  5. add_library(TestMain TestMain.cpp)
  6. target_link_libraries(TestMain Catch Trompeloeil)
  7. function(add_test_suite name)
  8. add_executable(${name} ${name}.cpp)
  9. target_link_libraries(${name} TestMain ScopeGuard)
  10. add_test(NAME ${name} COMMAND ${name})
  11. endfunction()
  12. add_test_suite(ScopeGuardTest)
  13. add_test_suite(UniqueResourceTest)
  14. add_custom_target(unittest ScopeGuardTest
  15. COMMAND UniqueResourceTest
  16. COMMENT "Running unittests\n\n"
  17. VERBATIM
  18. )