summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/PositionIndependentCode/Debug.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/PositionIndependentCode/Debug.cmake')
-rw-r--r--Tests/RunCMake/PositionIndependentCode/Debug.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/PositionIndependentCode/Debug.cmake b/Tests/RunCMake/PositionIndependentCode/Debug.cmake
new file mode 100644
index 0000000000..4a8fbacba4
--- /dev/null
+++ b/Tests/RunCMake/PositionIndependentCode/Debug.cmake
@@ -0,0 +1,8 @@
+
+add_library(iface INTERFACE)
+set_property(TARGET iface PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE ON)
+
+set(CMAKE_DEBUG_TARGET_PROPERTIES POSITION_INDEPENDENT_CODE)
+add_library(foo main.cpp)
+target_link_libraries(foo iface)
+set_property(TARGET foo PROPERTY POSITION_INDEPENDENT_CODE ON)