summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx40
1 files changed, 40 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 53c0205..6f53009 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -153,6 +153,7 @@ public:
};
std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
std::vector<TargetPropertyEntry*> CompileOptionsEntries;
+ std::vector<TargetPropertyEntry*> CompileFeaturesEntries;
std::vector<TargetPropertyEntry*> CompileDefinitionsEntries;
std::vector<TargetPropertyEntry*> SourceEntries;
std::vector<cmValueWithOrigin> LinkImplementationPropertyEntries;
@@ -1722,6 +1723,17 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
new cmTargetInternals::TargetPropertyEntry(cge));
return;
}
+ if(prop == "COMPILE_FEATURES")
+ {
+ cmListFileBacktrace lfbt;
+ this->Makefile->GetBacktrace(lfbt);
+ cmGeneratorExpression ge(lfbt);
+ deleteAndClear(this->Internal->CompileFeaturesEntries);
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
+ this->Internal->CompileFeaturesEntries.push_back(
+ new cmTargetInternals::TargetPropertyEntry(cge));
+ return;
+ }
if(prop == "COMPILE_DEFINITIONS")
{
cmListFileBacktrace lfbt;
@@ -1812,6 +1824,15 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
new cmTargetInternals::TargetPropertyEntry(ge.Parse(value)));
return;
}
+ if(prop == "COMPILE_FEATURES")
+ {
+ cmListFileBacktrace lfbt;
+ this->Makefile->GetBacktrace(lfbt);
+ cmGeneratorExpression ge(lfbt);
+ this->Internal->CompileFeaturesEntries.push_back(
+ new cmTargetInternals::TargetPropertyEntry(ge.Parse(value)));
+ return;
+ }
if(prop == "COMPILE_DEFINITIONS")
{
cmListFileBacktrace lfbt;
@@ -3109,6 +3130,24 @@ const char *cmTarget::GetProperty(const std::string& prop,
}
return output.c_str();
}
+ if(prop == "COMPILE_FEATURES")
+ {
+ static std::string output;
+ output = "";
+ std::string sep;
+ typedef cmTargetInternals::TargetPropertyEntry
+ TargetPropertyEntry;
+ for (std::vector<TargetPropertyEntry*>::const_iterator
+ it = this->Internal->CompileFeaturesEntries.begin(),
+ end = this->Internal->CompileFeaturesEntries.end();
+ it != end; ++it)
+ {
+ output += sep;
+ output += (*it)->ge->GetInput();
+ sep = ";";
+ }
+ return output.c_str();
+ }
if(prop == "COMPILE_DEFINITIONS")
{
static std::string output;
@@ -6886,6 +6925,7 @@ cmTargetInternalPointer::~cmTargetInternalPointer()
{
deleteAndClear(this->Pointer->IncludeDirectoriesEntries);
deleteAndClear(this->Pointer->CompileOptionsEntries);
+ deleteAndClear(this->Pointer->CompileFeaturesEntries);
deleteAndClear(this->Pointer->CompileDefinitionsEntries);
deleteAndClear(this->Pointer->SourceEntries);
delete this->Pointer;