3581b96caa
This allows a dependee to inform a target that it should have its POSITION_INDEPENDENT_CODE property set to ON, or OFF. The value of the POSITION_INDEPENDENT_CODE property, if set, must be consistent with any INTERFACE_POSITION_INDEPENDENT_CODE properties on dependees. Add a test covering the consistency checks on platforms where they run.
10 lines
309 B
CMake
10 lines
309 B
CMake
|
|
add_library(picon UNKNOWN IMPORTED)
|
|
set_property(TARGET picon PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
add_library(picoff UNKNOWN IMPORTED)
|
|
set_property(TARGET picoff PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE OFF)
|
|
|
|
add_executable(conflict "main.cpp")
|
|
target_link_libraries(conflict picon picoff)
|