diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-05-14 09:42:34 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-05-14 14:40:53 (GMT) |
commit | 929c8a7860344b0b2edeefaf09be1ef0b09f4b23 (patch) | |
tree | a5933ca4e2f27e618240e73af10972a35bf0cf5b /Tests | |
parent | 21da0f83a21794bdd283210608ca7c127db084ec (diff) | |
download | CMake-929c8a7860344b0b2edeefaf09be1ef0b09f4b23.zip CMake-929c8a7860344b0b2edeefaf09be1ef0b09f4b23.tar.gz CMake-929c8a7860344b0b2edeefaf09be1ef0b09f4b23.tar.bz2 |
INTERFACE_POSITION_INDEPENDENT_CODE must be transitive for OBJECT library
Fixes: #22174
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/PositionIndependentTargets/interface/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/PositionIndependentTargets/interface/CMakeLists.txt b/Tests/PositionIndependentTargets/interface/CMakeLists.txt index 65f3b76..90186a3 100644 --- a/Tests/PositionIndependentTargets/interface/CMakeLists.txt +++ b/Tests/PositionIndependentTargets/interface/CMakeLists.txt @@ -12,6 +12,9 @@ set_property(TARGET sharedlib PROPERTY DEFINE_SYMBOL PIC_TEST_BUILD_DLL) add_executable(test_iface_via_shared "${CMAKE_CURRENT_SOURCE_DIR}/../pic_main.cpp") target_link_libraries(test_iface_via_shared sharedlib) +add_library(objectlib OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/../pic_lib.cpp") +target_link_libraries(objectlib piciface) + add_library(sharedlibpic SHARED "${CMAKE_CURRENT_SOURCE_DIR}/../pic_lib.cpp") set_property(TARGET sharedlibpic PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE ON) set_property(TARGET sharedlibpic PROPERTY DEFINE_SYMBOL PIC_TEST_BUILD_DLL) |