diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-05-15 09:32:30 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-05-21 15:22:32 (GMT) |
commit | 0dfe395e3cb1a720c4853087db554a6827feaadb (patch) | |
tree | 83d9cbe0ee9843bc4aa0012d9a7064a3522ba018 /Source/cmGeneratorExpression.cxx | |
parent | aa8a6fcee8c67b0516efcd745fb1d7a66d249096 (diff) | |
download | CMake-0dfe395e3cb1a720c4853087db554a6827feaadb.zip CMake-0dfe395e3cb1a720c4853087db554a6827feaadb.tar.gz CMake-0dfe395e3cb1a720c4853087db554a6827feaadb.tar.bz2 |
Features: Add COMPILE_FEATURES generator expression.
Allow setting build properties based on the features available
for a target. The availability of features is determined at
generate-time by evaluating the link implementation.
Ensure that the <LANG>_STANDARD determined while evaluating
COMPILE_FEATURES in the link implementation is not lower than that
provided by the INTERFACE of the link implementation. This is
similar to handling of transitive properties such as
POSITION_INDEPENDENT_CODE.
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index d09e950..d53bdd7 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -110,6 +110,9 @@ const char *cmCompiledGeneratorExpression::Evaluate( break; } } + + this->MaxLanguageStandard = context.MaxLanguageStandard; + if (!context.HadError) { this->HadContextSensitiveCondition = context.HadContextSensitiveCondition; @@ -465,3 +468,17 @@ bool cmGeneratorExpression::IsValidTargetName(const std::string &input) return targetNameValidator.find(input.c_str()); } + +//---------------------------------------------------------------------------- +void +cmCompiledGeneratorExpression::GetMaxLanguageStandard(cmTarget const* tgt, + std::map<std::string, std::string>& mapping) +{ + typedef std::map<cmTarget const*, + std::map<std::string, std::string> > MapType; + MapType::const_iterator it = this->MaxLanguageStandard.find(tgt); + if (it != this->MaxLanguageStandard.end()) + { + mapping = it->second; + } +} |