diff options
Diffstat (limited to 'Tests/RunCMake/PositionIndependentCode/Genex1.cmake')
-rw-r--r-- | Tests/RunCMake/PositionIndependentCode/Genex1.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/PositionIndependentCode/Genex1.cmake b/Tests/RunCMake/PositionIndependentCode/Genex1.cmake new file mode 100644 index 0000000..a91be3e --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/Genex1.cmake @@ -0,0 +1,9 @@ + +add_library(genex_pic UNKNOWN IMPORTED) +# PIC is ON if sibling target is a library, OFF if it is an executable +set_property(TARGET genex_pic PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE $<NOT:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>) + + +add_library(conflict1 STATIC main.cpp) +set_property(TARGET conflict1 PROPERTY POSITION_INDEPENDENT_CODE OFF) +target_link_libraries(conflict1 PRIVATE genex_pic) |