Commit 567c8d10 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

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

This reverts commit 9712362b.
parent a1c4905f
......@@ -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)
......
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\)
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>)
......@@ -16,4 +16,3 @@ run_cmake(BadInvalidName6)
run_cmake(BadInvalidName7)
run_cmake(BadInvalidName8)
run_cmake(BadLinked)
run_cmake(BadLinked-UtilityTarget)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment