From 89f467a4885e559753778c369f30a42e09101a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Thu, 9 Jun 2022 10:57:30 +0200 Subject: Fixed undefined symbols when mold linker was used for linking libnest2d_tests and sla_print_tests. --- tests/libnest2d/CMakeLists.txt | 4 +++- tests/sla_print/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/libnest2d/CMakeLists.txt b/tests/libnest2d/CMakeLists.txt index 9bafe84a0..ea4f4255e 100644 --- a/tests/libnest2d/CMakeLists.txt +++ b/tests/libnest2d/CMakeLists.txt @@ -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}: ") diff --git a/tests/sla_print/CMakeLists.txt b/tests/sla_print/CMakeLists.txt index a26d5f480..24e9552c5 100644 --- a/tests/sla_print/CMakeLists.txt +++ b/tests/sla_print/CMakeLists.txt @@ -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) -- cgit v1.2.3