summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands/target_compile_definitions
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-21 11:28:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-21 11:32:46 (GMT)
commitb98d14d40016efee420bee26b9795880fdf6a5f8 (patch)
tree7226b6db415fb92680bbefcebf205a21b6175f3f /Tests/CMakeCommands/target_compile_definitions
parent48a4cf21825c9ed5f53ac25d5f4577baaf92d1f7 (diff)
downloadCMake-b98d14d40016efee420bee26b9795880fdf6a5f8.zip
CMake-b98d14d40016efee420bee26b9795880fdf6a5f8.tar.gz
CMake-b98d14d40016efee420bee26b9795880fdf6a5f8.tar.bz2
Disallow porcelain to populate includes and defines of IMPORTED targets.
With similar reasoning to the parent commit, as downstreams, we can't determine what $<CONFIG> generator expressions would be appropriate. Upstream would have populated the INTERFACE_INCLUDE_DIRECTORIES with config-specific generator expressions, possibly appropriate for their DEBUG_CONFIGURATIONS. In theory, if we would add include directories for a DEBUG intent, we would have to match the upstream configurations for that. Rather than attempting to discover the appropriate configurations at this time, simplify the feature instead. The use of IMPORTED targets with these commands could still be added in the future if targets would export their DEBUG_CONFIGURATIONS somehow.
Diffstat (limited to 'Tests/CMakeCommands/target_compile_definitions')
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt7
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.cpp4
2 files changed, 1 insertions, 10 deletions
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index a37c597..3eca7fc 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -12,11 +12,6 @@ target_compile_definitions(target_compile_definitions
INTERFACE MY_INTERFACE_DEFINE
)
-add_library(importedlib UNKNOWN IMPORTED)
-target_compile_definitions(importedlib
- INTERFACE MY_IMPORTEDINTERFACE_DEFINE
-)
-
add_executable(consumer
"${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp"
)
@@ -24,5 +19,5 @@ add_executable(consumer
target_compile_definitions(consumer
PRIVATE target_compile_definitions importedlib
$<$<TARGET_DEFINED:notdefined>:SHOULD_NOT_BE_DEFINED>
- $<$<TARGET_DEFINED:importedlib>:SHOULD_BE_DEFINED>
+ $<$<TARGET_DEFINED:target_compile_definitions>:SHOULD_BE_DEFINED>
)
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
index 1ef657d..f835b6c 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
@@ -11,10 +11,6 @@
#error Expected MY_INTERFACE_DEFINE
#endif
-#ifndef MY_IMPORTEDINTERFACE_DEFINE
-#error Expected MY_IMPORTEDINTERFACE_DEFINE
-#endif
-
#ifdef SHOULD_NOT_BE_DEFINED
#error Unexpected SHOULD_NOT_BE_DEFINED
#endif