CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. # TODO Add individual tests as executables in separate directories
  2. # add_subirectory(<testcase>)
  3. set(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
  4. file(TO_NATIVE_PATH "${TEST_DATA_DIR}" TEST_DATA_DIR)
  5. add_library(Catch2 INTERFACE)
  6. list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/Catch2)
  7. target_include_directories(Catch2 INTERFACE ${CMAKE_CURRENT_LIST_DIR})
  8. add_library(Catch2::Catch2 ALIAS Catch2)
  9. include(Catch)
  10. set(CATCH_EXTRA_ARGS "" CACHE STRING "Extra arguments for catch2 test suites.")
  11. add_library(test_common INTERFACE)
  12. target_compile_definitions(test_common INTERFACE TEST_DATA_DIR=R"\(${TEST_DATA_DIR}\)" CATCH_CONFIG_FAST_COMPILE)
  13. target_link_libraries(test_common INTERFACE Catch2::Catch2)
  14. if (APPLE)
  15. target_link_libraries(test_common INTERFACE "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
  16. endif()
  17. set_property(GLOBAL PROPERTY USE_FOLDERS ON)
  18. add_subdirectory(libnest2d)
  19. add_subdirectory(libslic3r)
  20. add_subdirectory(timeutils)
  21. add_subdirectory(fff_print)
  22. add_subdirectory(sla_print)
  23. add_subdirectory(cpp17 EXCLUDE_FROM_ALL) # does not have to be built all the time
  24. # add_subdirectory(example)