cmTarget: Fast path for regular properties
This commit is contained in:
parent
4cfa918a9a
commit
97ce676e75
|
@ -3085,6 +3085,21 @@ const char *cmTarget::GetProperty(const std::string& prop,
|
|||
}
|
||||
}
|
||||
}
|
||||
static std::set<std::string> specialProps;
|
||||
if(specialProps.empty())
|
||||
{
|
||||
specialProps.insert("INCLUDE_DIRECTORIES");
|
||||
specialProps.insert("COMPILE_FEATURES");
|
||||
specialProps.insert("COMPILE_OPTIONS");
|
||||
specialProps.insert("COMPILE_DEFINITIONS");
|
||||
specialProps.insert("LINK_LIBRARIES");
|
||||
specialProps.insert("IMPORTED");
|
||||
specialProps.insert("NAME");
|
||||
specialProps.insert("SOURCES");
|
||||
specialProps.insert("TYPE");
|
||||
}
|
||||
if(specialProps.count(prop))
|
||||
{
|
||||
if(prop == "INCLUDE_DIRECTORIES")
|
||||
{
|
||||
if (this->Internal->IncludeDirectoriesEntries.empty())
|
||||
|
@ -3212,12 +3227,12 @@ const char *cmTarget::GetProperty(const std::string& prop,
|
|||
}
|
||||
if (!noMessage)
|
||||
{
|
||||
e << "Target \"" << this->Name << "\" contains $<TARGET_OBJECTS> "
|
||||
"generator expression in its sources list. This content was not "
|
||||
"previously part of the SOURCES property when that property was "
|
||||
"read at configure time. Code reading that property needs to be "
|
||||
"adapted to ignore the generator expression using the "
|
||||
"string(GENEX_STRIP) command.";
|
||||
e << "Target \"" << this->Name << "\" contains "
|
||||
"$<TARGET_OBJECTS> generator expression in its sources list. "
|
||||
"This content was not previously part of the SOURCES property "
|
||||
"when that property was read at configure time. Code reading "
|
||||
"that property needs to be adapted to ignore the generator "
|
||||
"expression using the string(GENEX_STRIP) command.";
|
||||
context->IssueMessage(messageType, e.str());
|
||||
}
|
||||
if (addContent)
|
||||
|
@ -3260,6 +3275,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
|
|||
{
|
||||
return cmTarget::GetTargetTypeName(this->GetType());
|
||||
}
|
||||
}
|
||||
|
||||
bool chain = false;
|
||||
const char *retVal =
|
||||
|
|
Loading…
Reference in New Issue