Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Hejl <hejl.lukas@gmail.com>2022-06-09 11:57:30 +0300
committerLukáš Hejl <hejl.lukas@gmail.com>2022-06-09 11:57:30 +0300
commit89f467a4885e559753778c369f30a42e09101a00 (patch)
tree63f78191c30c517ba2133fe30185bf1309d6f53b
parent46ade5493778780d39f9df9a1cc49772273b4f8e (diff)
Fixed undefined symbols when mold linker was used for linking libnest2d_tests and sla_print_tests.
-rw-r--r--tests/libnest2d/CMakeLists.txt4
-rw-r--r--tests/sla_print/CMakeLists.txt4
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)