summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-15 14:54:02 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-15 14:54:02 (GMT)
commit6418eef222304db9a884a3cf101f86c2eabfb503 (patch)
tree9625972f9b30214ed867949fd8890832d5bb2c83 /Source/cmGeneratorExpressionEvaluator.cxx
parent44612e74075f751b01950dd0f00e86d61f9ba05a (diff)
parent45ec182d27dc27412c94ccb49632e22a55d5fbe4 (diff)
downloadCMake-6418eef222304db9a884a3cf101f86c2eabfb503.zip
CMake-6418eef222304db9a884a3cf101f86c2eabfb503.tar.gz
CMake-6418eef222304db9a884a3cf101f86c2eabfb503.tar.bz2
Merge topic 'fix-COMPILE_FEATURES-genex'
45ec182d Features: Fix the COMPILE_FEATURES genex for unavailable features. 2bead0eb cmMakefile: Rename a method to what it really does.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 2f17915..6b2d461 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -1368,10 +1368,17 @@ 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 (!context->Makefile->HaveFeatureAvailable(target,
+ if (std::find(langAvailable.begin(), langAvailable.end(), *it)
+ == langAvailable.end())
+ {
+ return "0";
+ }
+ if (!context->Makefile->HaveStandardAvailable(target,
lit->first, *it))
{
if (evalLL)