Debian Codegraph @

tests/CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 find_package(Catch2 3.8 REQUIRED)
2
3 include(Catch)
4
5 find_package(Boost ${Boost_VER} REQUIRED COMPONENTS nowide)
6
7 if (MSVC)
8 set_target_properties(Boost::nowide PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release)
9 endif ()
10
11 set(CATCH_EXTRA_ARGS "" CACHE STRING "Extra arguments for catch2 test suites.")
12
13 set(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
14 file(TO_NATIVE_PATH "${TEST_DATA_DIR}" TEST_DATA_DIR)
15
16 add_library(test_common INTERFACE)
17 target_include_directories(test_common INTERFACE ${CMAKE_CURRENT_LIST_DIR})
18 target_compile_definitions(test_common INTERFACE TEST_DATA_DIR=R"\(${TEST_DATA_DIR}\)" CATCH_CONFIG_FAST_COMPILE)
19 target_link_libraries(test_common INTERFACE Catch2::Catch2WithMain Boost::nowide)
20
21 if (EMSCRIPTEN)
22 target_link_libraries(test_common INTERFACE nodefs.js noderawfs.js)
23 endif()
24
25 add_subdirectory(core)
26
27 if (${PROJECT_NAME}_BUILD_COMPONENT_Binarize)
28 add_subdirectory(binarize)
29 endif()
30
31 if (${PROJECT_NAME}_BUILD_COMPONENT_Convert)
32 add_subdirectory(convert)
33 endif ()