summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-02 13:57:15 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-07 14:52:22 (GMT)
commit03355d6b5b382020e7dafb28605e6d8d2f20de3c (patch)
tree6ab7c7c46b02d36f28bd1309063e41b598b0e3dd /Source/cmLocalGenerator.cxx
parentfaeddf64f21b592a5663803ca8accdf9f4b73c29 (diff)
downloadCMake-03355d6b5b382020e7dafb28605e6d8d2f20de3c.zip
CMake-03355d6b5b382020e7dafb28605e6d8d2f20de3c.tar.gz
CMake-03355d6b5b382020e7dafb28605e6d8d2f20de3c.tar.bz2
cmTarget: Add COMPILE_FEATURES target property.
Use the contents of it to upgrade the CXX_STANDARD target property, if appropriate. This will have the effect of adding the -std=c++11 compile flag or other language specification on GNU when that is needed for the feature.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 779a2b8..0f8e7dc 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1459,6 +1459,19 @@ void cmLocalGenerator::AddCompileOptions(
this->AppendFlagEscape(flags, *i);
}
}
+ if (const char* featureProp = target->GetProperty("COMPILE_FEATURES"))
+ {
+ std::vector<std::string> features;
+ cmSystemTools::ExpandListArgument(featureProp, features);
+ for(std::vector<std::string>::const_iterator it = features.begin();
+ it != features.end(); ++it)
+ {
+ if (!this->Makefile->AddRequiredTargetFeature(target, *it))
+ {
+ return;
+ }
+ }
+ }
this->AddCompilerRequirementFlag(flags, target, lang);
}