diff options
author | Brad King <brad.king@kitware.com> | 2015-01-26 21:42:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-29 20:01:40 (GMT) |
commit | 3228fc5049e72e6d7584a6f3cec6055b8a726817 (patch) | |
tree | 5525012740e92d95e5721c6b549ef80c091dd6bb /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | ea7ca139ea4c3c88e432e722c9cfe1dd86a4359f (diff) | |
download | CMake-3228fc5049e72e6d7584a6f3cec6055b8a726817.zip CMake-3228fc5049e72e6d7584a6f3cec6055b8a726817.tar.gz CMake-3228fc5049e72e6d7584a6f3cec6055b8a726817.tar.bz2 |
Features: Define meaning for no language standard default
Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that
the toolchain has no notion of lanuage standard levels. In this case
the <LANG>_STANDARD[_REQUIRED] properties will have no effect.
Update the RunCMake.CompileFeatures test to exclude the
LinkImplementationFeatureCycle test when there is no standard default.
It can never fail because no use of specific features will adjust the
CXX_STANDARD level required for any target since the standard levels
have no meaning in this case.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 5f246f9..6692a92 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1370,6 +1370,8 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode { std::vector<std::string> const& langAvailable = availableFeatures[lit->first]; + const char* standardDefault = context->Makefile + ->GetDefinition("CMAKE_" + lit->first + "_STANDARD_DEFAULT"); for (std::vector<std::string>::const_iterator it = lit->second.begin(); it != lit->second.end(); ++it) { @@ -1378,6 +1380,12 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode { return "0"; } + if (standardDefault && !*standardDefault) + { + // This compiler has no notion of language standard levels. + // All features known for the language are always available. + continue; + } if (!context->Makefile->HaveStandardAvailable(target, lit->first, *it)) { @@ -1386,8 +1394,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode const char* l = target->GetProperty(lit->first + "_STANDARD"); if (!l) { - l = context->Makefile - ->GetDefinition("CMAKE_" + lit->first + "_STANDARD_DEFAULT"); + l = standardDefault; } assert(l); context->MaxLanguageStandard[target][lit->first] = l; |