summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-12 10:53:36 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-13 14:12:31 (GMT)
commit567c8d103ed3c3cb7303877d89e8508dd3f8d0ca (patch)
tree9cf5726f5d2bd20e36ef5db6b42acc9d3b8da6ea
parenta1c4905f723f9d99bd481580f9fe24fdaf81b174 (diff)
downloadCMake-567c8d103ed3c3cb7303877d89e8508dd3f8d0ca.zip
CMake-567c8d103ed3c3cb7303877d89e8508dd3f8d0ca.tar.gz
CMake-567c8d103ed3c3cb7303877d89e8508dd3f8d0ca.tar.bz2
Revert "Don't allow utility or global targets in the LINKED expression."
This reverts commit 9712362b4580fb92394ecf8ff57be186571f4319.
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx8
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-result.txt1
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-stderr.txt8
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget.cmake7
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/empty.cpp1
6 files changed, 0 insertions, 26 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 6c1c12a..eb8cdc8 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -759,14 +759,6 @@ private:
{
return std::string();
}
- if(target->GetType() >= cmTarget::UTILITY &&
- target->GetType() != cmTarget::UNKNOWN_LIBRARY)
- {
- ::reportError(context, content->GetOriginalExpression(),
- "Target \"" + item
- + "\" is not an executable or library.");
- return std::string();
- }
std::string propertyName = "INTERFACE_" + prop;
const char *propContent = target->GetProperty(propertyName.c_str());
if (!propContent)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-result.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-stderr.txt
deleted file mode 100644
index fb06554..0000000
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget-stderr.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-CMake Error at BadLinked-UtilityTarget.cmake:7 \(set_property\):
- Error evaluating generator expression:
-
- \$<LINKED:check>
-
- Target "check" is not an executable or library.
-Call Stack \(most recent call first\):
- CMakeLists.txt:8 \(include\)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget.cmake
deleted file mode 100644
index d114c8f..0000000
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadLinked-UtilityTarget.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-
-add_custom_target(check ALL
- COMMAND ${CMAKE_COMMAND} -E echo check
-)
-
-add_library(foo STATIC empty.cpp)
-set_property(TARGET foo PROPERTY INCLUDE_DIRECTORIES $<LINKED:check>)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
index 84039c4..ea48f61 100644
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/RunCMakeTest.cmake
@@ -16,4 +16,3 @@ run_cmake(BadInvalidName6)
run_cmake(BadInvalidName7)
run_cmake(BadInvalidName8)
run_cmake(BadLinked)
-run_cmake(BadLinked-UtilityTarget)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/empty.cpp b/Tests/RunCMake/TargetPropertyGeneratorExpressions/empty.cpp
deleted file mode 100644
index 8b1a393..0000000
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/empty.cpp
+++ /dev/null
@@ -1 +0,0 @@
-// empty