CMakeLists.txt 1.1 KB

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