CMakeLists.txt 514 B

12345678910111213141516171819
  1. # do not build the firmware by default (tests are the focus if not crosscompiling)
  2. project(cmake_test)
  3. # include catch_discover_tests function from Catch2
  4. include(${Catch2_SOURCE_DIR}/contrib/Catch.cmake)
  5. # Make test executable
  6. set(TEST_SOURCES
  7. tests.cpp
  8. Example_test.cpp
  9. PrusaStatistics_test.cpp
  10. #Tests/Timer_test.cpp
  11. #Firmware/Timer.cpp
  12. )
  13. add_executable(tests ${TEST_SOURCES})
  14. target_include_directories(tests PRIVATE Tests)
  15. target_link_libraries(tests Catch2::Catch2)
  16. catch_discover_tests(tests)