summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetPropCommandBase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTargetPropCommandBase.cxx')
-rw-r--r--Source/cmTargetPropCommandBase.cxx33
1 files changed, 6 insertions, 27 deletions
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index e1eb1d2..18a1d2a 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -66,14 +66,6 @@ bool cmTargetPropCommandBase
}
//----------------------------------------------------------------------------
-static bool isGeneratorExpression(const std::string &lib)
-{
- const std::string::size_type openpos = lib.find("$<");
- return (openpos != std::string::npos)
- && (lib.find(">", openpos) != std::string::npos);
-}
-
-//----------------------------------------------------------------------------
bool cmTargetPropCommandBase
::ProcessContentArgs(std::vector<std::string> const& args,
unsigned int &argIndex, bool prepend)
@@ -96,9 +88,8 @@ bool cmTargetPropCommandBase
++argIndex;
- std::string content;
+ std::vector<std::string> content;
- std::string sep;
for(unsigned int i=argIndex; i < args.size(); ++i, ++argIndex)
{
if(args[i] == "PUBLIC"
@@ -108,20 +99,7 @@ bool cmTargetPropCommandBase
this->PopulateTargetProperies(scope, content, prepend);
return true;
}
- if (this->Makefile->FindTargetToUse(args[i].c_str()))
- {
- content += sep + "$<TARGET_PROPERTY:" + args[i]
- + ",INTERFACE_" + this->Property + ">";
- }
- else if(isGeneratorExpression(args[i]))
- {
- content += sep + args[i];
- }
- else if (!this->HandleNonTargetArg(content, sep, args[i], args[0]))
- {
- return false;
- }
- sep = ";";
+ content.push_back(args[i]);
}
this->PopulateTargetProperies(scope, content, prepend);
return true;
@@ -130,7 +108,8 @@ bool cmTargetPropCommandBase
//----------------------------------------------------------------------------
void cmTargetPropCommandBase
::PopulateTargetProperies(const std::string &scope,
- const std::string &content, bool prepend)
+ const std::vector<std::string> &content,
+ bool prepend)
{
if (scope == "PRIVATE" || scope == "PUBLIC")
{
@@ -142,7 +121,7 @@ void cmTargetPropCommandBase
{
const std::string propName = std::string("INTERFACE_") + this->Property;
const char *propValue = this->Target->GetProperty(propName.c_str());
- const std::string totalContent = content + (propValue
+ const std::string totalContent = this->Join(content) + (propValue
? std::string(";") + propValue
: std::string());
this->Target->SetProperty(propName.c_str(), totalContent.c_str());
@@ -150,7 +129,7 @@ void cmTargetPropCommandBase
else
{
this->Target->AppendProperty(("INTERFACE_" + this->Property).c_str(),
- content.c_str());
+ this->Join(content).c_str());
}
}
}