diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-19 10:21:14 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-20 16:06:47 (GMT) |
commit | e98799105bdb296e8d9f5b3ef5cf99bcebcafc40 (patch) | |
tree | 3cc97cedcc2bac471a9868e95a9982d35de6258c /Tests/ExportImport | |
parent | d9afacced34b2ef17a6c3ca2f66975272cf8473f (diff) | |
download | CMake-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')
-rw-r--r-- | Tests/ExportImport/Import/A/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/ExportImport/Import/A/deps_shared_iface.cpp | 4 |
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 |