summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Import
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-19 10:21:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-20 16:06:47 (GMT)
commite98799105bdb296e8d9f5b3ef5cf99bcebcafc40 (patch)
tree3cc97cedcc2bac471a9868e95a9982d35de6258c /Tests/ExportImport/Import
parentd9afacced34b2ef17a6c3ca2f66975272cf8473f (diff)
downloadCMake-e98799105bdb296e8d9f5b3ef5cf99bcebcafc40.zip
CMake-e98799105bdb296e8d9f5b3ef5cf99bcebcafc40.tar.gz
CMake-e98799105bdb296e8d9f5b3ef5cf99bcebcafc40.tar.bz2
Make INTERFACE determined properties readable in generator expressions.
The properties are evaluated as link-dependent interface properties when evaluating the generator expressions.
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt7
-rw-r--r--Tests/ExportImport/Import/A/deps_shared_iface.cpp4
2 files changed, 10 insertions, 1 deletions
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 4812e7e..83331cf 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -165,7 +165,11 @@ target_compile_definitions(deps_iface PRIVATE testLibDepends)
add_executable(deps_shared_iface deps_shared_iface.cpp)
target_link_libraries(deps_shared_iface testSharedLibDepends)
target_include_directories(deps_shared_iface PRIVATE testSharedLibDepends)
-target_compile_definitions(deps_shared_iface PRIVATE testSharedLibDepends)
+target_compile_definitions(deps_shared_iface
+ PRIVATE
+ testSharedLibDepends
+ $<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
+)
if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
include(CheckCXXCompilerFlag)
@@ -194,4 +198,5 @@ target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends bld_subdirlib)
target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends bld_subdirlib)
target_compile_definitions(deps_shared_iface2
PRIVATE bld_testSharedLibDepends TEST_SUBDIR_LIB
+ $<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
)
diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
index 43f832a..8ed032e 100644
--- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp
+++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
@@ -8,6 +8,10 @@
#endif
#endif
+#ifndef PIC_PROPERTY_IS_ON
+#error Expected PIC_PROPERTY_IS_ON
+#endif
+
#ifdef TEST_SUBDIR_LIB
#include "subdir.h"
#endif