CMakeLists.txt 593 B

123456789101112131415161718192021222324
  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. Tests/AutoDeplete_test.cpp
  14. Tests/PrusaStatistics_test.cpp
  15. Firmware/Timer.cpp
  16. Firmware/AutoDeplete.cpp
  17. )
  18. add_executable(tests ${TEST_SOURCES})
  19. target_include_directories(tests PRIVATE Tests)
  20. target_link_libraries(tests Catch)