diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-31 10:18:49 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-31 10:18:49 (GMT) |
commit | 30268b46f8237f25c82858693c000f5da8ede6ad (patch) | |
tree | 5d14f3be6bea68bf25df9984306d045e1e2da6d0 /Tests/CompatibleInterface | |
parent | da2b0245a380282892be8007f4c3d184a91bcfe0 (diff) | |
download | CMake-30268b46f8237f25c82858693c000f5da8ede6ad.zip CMake-30268b46f8237f25c82858693c000f5da8ede6ad.tar.gz CMake-30268b46f8237f25c82858693c000f5da8ede6ad.tar.bz2 |
Handle reading empty properties defined by the link interface.
This was segfaulting before.
Diffstat (limited to 'Tests/CompatibleInterface')
-rw-r--r-- | Tests/CompatibleInterface/CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Tests/CompatibleInterface/CMakeLists.txt b/Tests/CompatibleInterface/CMakeLists.txt index 259b5a1..329510b 100644 --- a/Tests/CompatibleInterface/CMakeLists.txt +++ b/Tests/CompatibleInterface/CMakeLists.txt @@ -48,10 +48,22 @@ target_compile_definitions(CompatibleInterface add_library(iface2 SHARED iface2.cpp) generate_export_header(iface2) +set_property(TARGET iface2 APPEND PROPERTY + COMPATIBLE_INTERFACE_STRING + Iface2_PROP +) + # For the LINK_LIBRARIES and related properties, we should not evaluate # properties defined only in the interface - they should be implicitly zero set_property(TARGET iface2 APPEND PROPERTY LINK_INTERFACE_LIBRARIES $<$<BOOL:$<TARGET_PROPERTY:BOOL_PROP4>>:nonexistant> ) -target_link_libraries(CompatibleInterface iface2) +target_link_libraries(CompatibleInterface iface2 + $<$<BOOL:$<TARGET_PROPERTY:Iface2_PROP>>:nonexistant> +) +# Test that this does not segfault: +target_compile_definitions(CompatibleInterface + PRIVATE + $<$<BOOL:$<TARGET_PROPERTY:Iface2_PROP>>:SOME_DEFINE> +) |