diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 09806e275..cc1df846d 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -174,7 +174,9 @@ public: std::vector CompileOptionsEntries; std::vector CompileOptionsBacktraces; std::vector CompileOptionsItems; - std::vector CompileFeaturesEntries; + std::vector CompileFeaturesEntries; + std::vector CompileFeaturesBacktraces; + std::vector CompileFeaturesItems; std::vector CompileDefinitionsEntries; std::vector SourceEntries; std::vector 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 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 &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;