2018-11-02 11:57:57 +01:00
|
|
|
# TODO Add individual tests as executables in separate directories
|
2019-09-24 10:48:24 +02:00
|
|
|
# add_subirectory(<testcase>)
|
2018-11-02 11:57:57 +01:00
|
|
|
|
2019-09-24 10:48:24 +02:00
|
|
|
set(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
|
|
|
file(TO_NATIVE_PATH "${TEST_DATA_DIR}" TEST_DATA_DIR)
|
|
|
|
|
2019-10-04 11:04:26 +02: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)
|
2019-12-22 14:17:26 +01:00
|
|
|
if (APPLE)
|
|
|
|
# OSX builds targeting OSX 10.9 do not support new std::uncought_exception()
|
|
|
|
# see https://github.com/catchorg/Catch2/issues/1218
|
2019-12-22 14:25:07 +01:00
|
|
|
target_compile_definitions(Catch2 INTERFACE -DCATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS)
|
2019-12-22 14:17:26 +01:00
|
|
|
endif()
|
2019-10-04 11:04:26 +02:00
|
|
|
include(Catch)
|
|
|
|
|
2019-10-30 10:47:04 +01:00
|
|
|
set(CATCH_EXTRA_ARGS "" CACHE STRING "Extra arguments for catch2 test suites.")
|
2019-10-25 10:41:56 +02:00
|
|
|
|
2019-09-24 10:48:24 +02:00
|
|
|
add_library(test_common INTERFACE)
|
2019-10-14 12:50:08 +02: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 11:08:46 +02:00
|
|
|
if (APPLE)
|
|
|
|
target_link_libraries(test_common INTERFACE "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
|
|
|
|
endif()
|
|
|
|
|
2019-10-14 14:58:07 +02:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
2019-10-04 13:52:42 +02:00
|
|
|
add_subdirectory(libnest2d)
|
2019-10-15 09:40:40 +02:00
|
|
|
add_subdirectory(libslic3r)
|
2020-03-06 15:18:14 +01:00
|
|
|
add_subdirectory(slic3rutils)
|
2019-10-15 09:40:40 +02:00
|
|
|
add_subdirectory(fff_print)
|
2019-09-24 15:24:47 +02:00
|
|
|
add_subdirectory(sla_print)
|
2019-12-06 09:28:17 +01:00
|
|
|
add_subdirectory(cpp17 EXCLUDE_FROM_ALL) # does not have to be built all the time
|
2019-10-25 10:41:56 +02:00
|
|
|
# add_subdirectory(example)
|