Revert "Don't allow utility or global targets in the LINKED expression."

This reverts commit 9712362b45.
This commit is contained in:
Stephen Kelly 2013-02-12 11:53:36 +01:00
parent a1c4905f72
commit 567c8d103e
6 changed files with 0 additions and 26 deletions

View File

@ -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)

View File

@ -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\)

View File

@ -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>)

View File

@ -16,4 +16,3 @@ run_cmake(BadInvalidName6)
run_cmake(BadInvalidName7)
run_cmake(BadInvalidName8)
run_cmake(BadLinked)
run_cmake(BadLinked-UtilityTarget)