PrusaSlicer-NonPlainar/tests/CMakeLists.txt
tamasmeszaros fbc174ad06 Fix cmake with msvc generator.
* Remove unused libnest2d files. Make it use the global build script targets.
* Modify FindTBB to address multi-config builds and take care of __TBB_NO_IMPLICIT_LINKAGE
* Move FindNLopt to project common cmake module dir
* Rename libnest.hpp to nester.hpp and libnest.h to libnest.hpp 
* Clean up common test suite build scripts
2019-10-14 12:50:08 +02:00

25 lines
863 B
CMake

# TODO Add individual tests as executables in separate directories
# add_subirectory(<testcase>)
set(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
file(TO_NATIVE_PATH "${TEST_DATA_DIR}" TEST_DATA_DIR)
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)
add_library(test_common INTERFACE)
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)
if (APPLE)
target_link_libraries(test_common INTERFACE "-liconv -framework IOKit" "-framework CoreFoundation" -lc++)
endif()
add_subdirectory(libnest2d)
add_subdirectory(timeutils)
add_subdirectory(sla_print)