CMakeLists.txt 478 B

12345678910111213141516171819
  1. cmake_minimum_required(VERSION 3.0)
  2. project(cmake_test)
  3. # Prepare "Catch" library for other executables
  4. set(CATCH_INCLUDE_DIR Catch2)
  5. add_library(Catch INTERFACE)
  6. target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})
  7. # Make test executable
  8. set(TEST_SOURCES
  9. Tests/tests.cpp
  10. Tests/Example_test.cpp
  11. Tests/Timer_test.cpp
  12. Firmware/Timer.cpp
  13. )
  14. add_executable(tests ${TEST_SOURCES})
  15. target_include_directories(tests PRIVATE Tests)
  16. target_link_libraries(tests Catch)