2018-11-02 10:57:57 +00:00
|
|
|
# TODO Add individual tests as executables in separate directories
|
2019-09-24 08:48:24 +00:00
|
|
|
# add_subirectory(<testcase>)
|
2018-11-02 10:57:57 +00:00
|
|
|
|
2019-09-24 08:48:24 +00:00
|
|
|
set(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
|
|
|
file(TO_NATIVE_PATH "${TEST_DATA_DIR}" TEST_DATA_DIR)
|
|
|
|
|
2019-10-04 09:04:26 +00:00
|
|
|
add_library(Catch2 INTERFACE)
|
|
|
|
list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/Catch2)
|
|
|
|
target_include_directories(Catch2 INTERFACE ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
add_library(Catch2::Catch2 ALIAS Catch2)
|
|
|
|
include(Catch)
|
|
|
|
|
2019-10-30 09:47:04 +00:00
|
|
|
set(CATCH_EXTRA_ARGS "" CACHE STRING "Extra arguments for catch2 test suites.")
|
2019-10-25 08:41:56 +00:00
|
|
|
|
2019-09-24 08:48:24 +00:00
|
|
|
add_library(test_common INTERFACE)
|
2019-10-14 10:50:08 +00:00
|
|
|
target_compile_definitions(test_common INTERFACE TEST_DATA_DIR=R"\(${TEST_DATA_DIR}\)" CATCH_CONFIG_FAST_COMPILE)
|
|
|
|
target_link_libraries(test_common INTERFACE Catch2::Catch2)
|
|
|
|
|
2019-10-04 09:08:46 +00:00
|
|
|
if (APPLE)
|
|
|
|
target_link_libraries(test_common INTERFACE "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
|
|
|
|
endif()
|
|
|
|
|
2019-10-14 12:58:07 +00:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
2019-10-04 11:52:42 +00:00
|
|
|
add_subdirectory(libnest2d)
|
2019-10-15 07:40:40 +00:00
|
|
|
add_subdirectory(libslic3r)
|
2019-10-04 11:52:42 +00:00
|
|
|
add_subdirectory(timeutils)
|
2019-10-15 07:40:40 +00:00
|
|
|
add_subdirectory(fff_print)
|
2019-09-24 13:24:47 +00:00
|
|
|
add_subdirectory(sla_print)
|
2019-12-05 13:40:31 +00:00
|
|
|
add_subdirectory(cpp17)
|
2019-10-25 08:41:56 +00:00
|
|
|
# add_subdirectory(example)
|