Fix blender_test not re-linked on macOS after changes #106051

Merged
Sergey Sharybin merged 1 commits from Sergey/blender:fix_blender_test into main 2023-03-24 14:11:58 +01:00
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ endif()
get_property(_test_libs GLOBAL PROPERTY BLENDER_TEST_LIBS)
if(WIN32 OR APPLE)
# Windows and macOS set target_link_options after target creation.
#
# Still need to ensure dependency between the test libraries and the blender_test binary, so that
# the latter one is re-linked when the test library is re-compiled.
list(APPEND TEST_LIBS ${_test_libs})
elseif(UNIX)
list(APPEND TEST_LIBS "-Wl,--whole-archive" ${_test_libs} "-Wl,--no-whole-archive")
else()