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 770B

7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
7 jaren geleden
12345678910111213141516171819202122232425262728
  1. find_package(Catch2 REQUIRED)
  2. find_package(trompeloeil REQUIRED)
  3. add_library(TestMain TestMain.cpp)
  4. target_link_libraries(TestMain PUBLIC Catch2::Catch2 trompeloeil::trompeloeil)
  5. function(add_test_suite name)
  6. add_executable(${name} ${name}.cpp)
  7. target_link_libraries(${name} PRIVATE TestMain ScopeGuard)
  8. add_test(${name} ${name})
  9. endfunction()
  10. add_test_suite(ScopeExitTest)
  11. add_test_suite(ScopeSuccessTest)
  12. add_test_suite(ScopeFailTest)
  13. add_test_suite(UniqueResourceTest)
  14. add_custom_target(unittest ScopeExitTest
  15. COMMAND ScopeSuccessTest
  16. COMMAND ScopeFailTest
  17. COMMAND UniqueResourceTest
  18. COMMENT "Running unittests\n\n"
  19. VERBATIM
  20. )