summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PositionIndependentCode/Genex1.cmake
blob: a91be3eecd4ecbbef88ba5b99b2af2ba61687c7d (plain)
1
2
3
4
5
6
7
8
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)