summaryrefslogtreecommitdiff
path: root/Tests/ObjectLibrary/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-08 20:10:22 +0100
committerStephen Kelly <steveire@gmail.com>2013-02-08 20:10:22 +0100
commitfaa927e273e04b9aadc13fb1f2b8b307b7383cd2 (patch)
treec6b6764c2d46c0a47e42cee2249391ca8f7a2747 /Tests/ObjectLibrary/CMakeLists.txt
parent510fdcb18801076e2041eaae2941375eecc93ec2 (diff)
downloadcmake-faa927e273e04b9aadc13fb1f2b8b307b7383cd2.tar.gz
Make sure INTERFACE properties work with OBJECT libraries.
Diffstat (limited to 'Tests/ObjectLibrary/CMakeLists.txt')
-rw-r--r--Tests/ObjectLibrary/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt
index 87234159f7..13a07b44a4 100644
--- a/Tests/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ObjectLibrary/CMakeLists.txt
@@ -26,6 +26,9 @@ endif()
# Test static library without its own sources.
add_library(ABstatic STATIC ${dummy} $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:B>)
+target_include_directories(ABstatic PUBLIC $<TARGET_PROPERTY:B,INTERFACE_INCLUDE_DIRECTORIES>)
+target_compile_definitions(ABstatic PUBLIC $<TARGET_PROPERTY:B,INTERFACE_COMPILE_DEFINITIONS>)
+
add_executable(UseABstatic mainAB.c)
target_link_libraries(UseABstatic ABstatic)
@@ -41,12 +44,17 @@ endif()
# Test shared library without its own sources.
add_library(ABshared SHARED ${dummy} ${ABshared_SRCS})
+target_include_directories(ABshared PUBLIC $<TARGET_PROPERTY:B,INTERFACE_INCLUDE_DIRECTORIES>)
+target_compile_definitions(ABshared PUBLIC $<TARGET_PROPERTY:B,INTERFACE_COMPILE_DEFINITIONS>)
+
add_executable(UseABshared mainAB.c)
set_property(TARGET UseABshared PROPERTY COMPILE_DEFINITIONS SHARED_B ${NO_A})
target_link_libraries(UseABshared ABshared)
# Test executable without its own sources.
add_library(ABmain OBJECT mainAB.c)
+target_include_directories(ABmain PUBLIC $<TARGET_PROPERTY:B,INTERFACE_INCLUDE_DIRECTORIES>)
+target_compile_definitions(ABmain PUBLIC $<TARGET_PROPERTY:B,INTERFACE_COMPILE_DEFINITIONS>)
add_executable(UseABinternal ${dummy}
$<TARGET_OBJECTS:ABmain> $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:B>
)