diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-11 16:53:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-12 15:30:43 (GMT) |
commit | 45ec182d27dc27412c94ccb49632e22a55d5fbe4 (patch) | |
tree | 142f696f140cb7f0ba105138ee7ad897cfd82d83 /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | 2bead0eb1b605cc5d0db23d9af00087277157921 (diff) | |
download | CMake-45ec182d27dc27412c94ccb49632e22a55d5fbe4.zip CMake-45ec182d27dc27412c94ccb49632e22a55d5fbe4.tar.gz CMake-45ec182d27dc27412c94ccb49632e22a55d5fbe4.tar.bz2 |
Features: Fix the COMPILE_FEATURES genex for unavailable features.
Previously, the genex tested only for CMake knowledge of the feature,
but not compiler knowledge of the feature.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 9ffe9f2..d5d78d5 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1373,9 +1373,16 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode for (LangMap::const_iterator lit = testedFeatures.begin(); lit != testedFeatures.end(); ++lit) { + std::vector<std::string> const& langAvailable + = availableFeatures[lit->first]; for (std::vector<std::string>::const_iterator it = lit->second.begin(); it != lit->second.end(); ++it) { + if (std::find(langAvailable.begin(), langAvailable.end(), *it) + == langAvailable.end()) + { + return "0"; + } if (!context->Makefile->HaveStandardAvailable(target, lit->first, *it)) { |