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

7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
123456789101112131415161718192021222324252627282930313233
  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})
  11. endfunction()
  12. add_test_suite(ScopeExitTest)
  13. add_test_suite(ScopeSuccessTest)
  14. add_test_suite(ScopeFailTest)
  15. add_test_suite(UniqueResourceTest)
  16. add_custom_target(unittest ScopeExitTest
  17. COMMAND ScopeSuccessTest
  18. COMMAND ScopeFailTest
  19. COMMAND UniqueResourceTest
  20. COMMENT "Running unittests\n\n"
  21. VERBATIM
  22. )