summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-04 19:23:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-07 15:06:18 (GMT)
commit44e071aeff4d533f116a7721919f9036c5d5a1d1 (patch)
tree375bfd69b68b8097b59784fe92be506652eb80fe /Source/cmTarget.cxx
parent772ecef4b8037d5ce59d24772c05829872aff406 (diff)
downloadCMake-44e071aeff4d533f116a7721919f9036c5d5a1d1.zip
CMake-44e071aeff4d533f116a7721919f9036c5d5a1d1.tar.gz
CMake-44e071aeff4d533f116a7721919f9036c5d5a1d1.tar.bz2
cmTarget: Split storage of compile features from genexes.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx29
1 files changed, 17 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 09806e2..cc1df84 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -174,7 +174,9 @@ public:
std::vector<std::string> CompileOptionsEntries;
std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
std::vector<TargetPropertyEntry*> CompileOptionsItems;
- std::vector<TargetPropertyEntry*> CompileFeaturesEntries;
+ std::vector<std::string> CompileFeaturesEntries;
+ std::vector<cmListFileBacktrace> CompileFeaturesBacktraces;
+ std::vector<TargetPropertyEntry*> CompileFeaturesItems;
std::vector<TargetPropertyEntry*> CompileDefinitionsEntries;
std::vector<TargetPropertyEntry*> SourceEntries;
std::vector<cmValueWithOrigin> LinkImplementationPropertyEntries;
@@ -467,6 +469,11 @@ void cmTarget::Compute()
this->Internal->CompileOptionsEntries,
this->Internal->CompileOptionsBacktraces,
this->Internal->CompileOptionsItems);
+
+ CreatePropertyGeneratorExpressions(
+ this->Internal->CompileFeaturesEntries,
+ this->Internal->CompileFeaturesBacktraces,
+ this->Internal->CompileFeaturesItems);
}
//----------------------------------------------------------------------------
@@ -1713,12 +1720,11 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
}
else if(prop == "COMPILE_FEATURES")
{
+ this->Internal->CompileFeaturesEntries.clear();
+ this->Internal->CompileFeaturesBacktraces.clear();
+ this->Internal->CompileFeaturesEntries.push_back(value);
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
- cmGeneratorExpression ge(lfbt);
- deleteAndClear(this->Internal->CompileFeaturesEntries);
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
- this->Internal->CompileFeaturesEntries.push_back(
- new cmTargetInternals::TargetPropertyEntry(cge));
+ this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
}
else if(prop == "COMPILE_DEFINITIONS")
{
@@ -1805,10 +1811,9 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
}
else if(prop == "COMPILE_FEATURES")
{
+ this->Internal->CompileFeaturesEntries.push_back(value);
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
- cmGeneratorExpression ge(lfbt);
- this->Internal->CompileFeaturesEntries.push_back(
- new cmTargetInternals::TargetPropertyEntry(ge.Parse(value)));
+ this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
}
else if(prop == "COMPILE_DEFINITIONS")
{
@@ -2433,7 +2438,7 @@ void cmTarget::GetCompileFeatures(std::vector<std::string> &result,
}
processCompileFeatures(this,
- this->Internal->CompileFeaturesEntries,
+ this->Internal->CompileFeaturesItems,
result,
uniqueFeatures,
&dagChecker,
@@ -2941,7 +2946,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
}
static std::string output;
- MakePropertyList(output, this->Internal->CompileFeaturesEntries);
+ output = cmJoin(this->Internal->CompileFeaturesEntries, ";");
return output.c_str();
}
else if(prop == propCOMPILE_OPTIONS)
@@ -4838,7 +4843,7 @@ cmTargetInternalPointer::~cmTargetInternalPointer()
{
cmDeleteAll(this->Pointer->IncludeDirectoriesItems);
cmDeleteAll(this->Pointer->CompileOptionsItems);
- cmDeleteAll(this->Pointer->CompileFeaturesEntries);
+ cmDeleteAll(this->Pointer->CompileFeaturesItems);
cmDeleteAll(this->Pointer->CompileDefinitionsEntries);
cmDeleteAll(this->Pointer->SourceEntries);
delete this->Pointer;