CMakeLists.txt 507 B

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