Fixed undefined symbols when mold linker was used for linking libnest2d_tests and sla_print_tests.

This commit is contained in:
Lukáš Hejl 2022-06-09 10:57:30 +02:00
parent 46ade54937
commit 89f467a488
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests_main.cpp printer_parts.cpp printer_parts.hpp)
target_link_libraries(${_TEST_NAME}_tests test_common libnest2d )
# mold linker for successful linking needs also to link TBB library and link it before libslic3r.
target_link_libraries(${_TEST_NAME}_tests test_common TBB::tbb libnest2d )
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
# catch_discover_tests(${_TEST_NAME}_tests TEST_PREFIX "${_TEST_NAME}: ")

View File

@ -5,7 +5,9 @@ add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests_main.cpp
sla_supptgen_tests.cpp
sla_raycast_tests.cpp
sla_archive_readwrite_tests.cpp)
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r)
# mold linker for successful linking needs also to link TBB library and link it before libslic3r.
target_link_libraries(${_TEST_NAME}_tests test_common TBB::tbb libslic3r)
set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
if (WIN32)