summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-04-13 10:11:31 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-04-17 08:00:03 (GMT)
commitaacd4e4a90a3afb23d681063d2ecba719f1adab8 (patch)
tree7e1a884cb47519099bd5db178681773f82dad688 /Source/cmGeneratorExpressionNode.cxx
parent9a450bcfec5411169007d5ca5f1bd40e6f476ff4 (diff)
downloadCMake-aacd4e4a90a3afb23d681063d2ecba719f1adab8.zip
CMake-aacd4e4a90a3afb23d681063d2ecba719f1adab8.tar.gz
CMake-aacd4e4a90a3afb23d681063d2ecba719f1adab8.tar.bz2
Refactoring: add cm::contains to <cmext/algorithm>
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index dfc354d..754a446 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -15,6 +15,7 @@
#include <cm/iterator>
#include <cm/string_view>
+#include <cmext/algorithm>
#include "cmsys/RegularExpression.hxx"
#include "cmsys/String.h"
@@ -313,7 +314,7 @@ static const struct InListNode : public cmGeneratorExpressionNode
break;
}
- return cmContains(values, parameters.front()) ? "1" : "0";
+ return cm::contains(values, parameters.front()) ? "1" : "0";
}
} inListNode;
@@ -921,8 +922,8 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
if (const char* mapValue =
context->CurrentTarget->GetProperty(mapProp)) {
cmExpandList(cmSystemTools::UpperCase(mapValue), mappedConfigs);
- return cmContains(mappedConfigs,
- cmSystemTools::UpperCase(parameters.front()))
+ return cm::contains(mappedConfigs,
+ cmSystemTools::UpperCase(parameters.front()))
? "1"
: "0";
}
@@ -1659,7 +1660,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
const char* standardDefault = context->LG->GetMakefile()->GetDefinition(
"CMAKE_" + lit.first + "_STANDARD_DEFAULT");
for (std::string const& it : lit.second) {
- if (!cmContains(langAvailable, it)) {
+ if (!cm::contains(langAvailable, it)) {
return "0";
}
if (standardDefault && !*standardDefault) {