diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-10-22 13:05:49 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-07 16:11:18 (GMT) |
commit | baff44345cff8e635766e020d316da514616c16e (patch) | |
tree | 5d5052e16ad545de670d3ec116a378297b2f482c /Source/cmLocalGenerator.cxx | |
parent | f97bf4370c283432c4e14fe54ed481d5d9b7ceef (diff) | |
download | CMake-baff44345cff8e635766e020d316da514616c16e.zip CMake-baff44345cff8e635766e020d316da514616c16e.tar.gz CMake-baff44345cff8e635766e020d316da514616c16e.tar.bz2 |
cmTarget: Allow populating COMPILE_FEATURES using generator expressions.
Delay validation of the content as a feature if it contains a
generator expression. It will be checked again at generate-time
after evaluation.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0f8e7dc..f581806 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1459,17 +1459,14 @@ void cmLocalGenerator::AddCompileOptions( this->AppendFlagEscape(flags, *i); } } - if (const char* featureProp = target->GetProperty("COMPILE_FEATURES")) + std::vector<std::string> features; + target->GetCompileFeatures(features); + for(std::vector<std::string>::const_iterator it = features.begin(); + it != features.end(); ++it) { - 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)) { - if (!this->Makefile->AddRequiredTargetFeature(target, *it)) - { - return; - } + return; } } this->AddCompilerRequirementFlag(flags, target, lang); |