diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-04-13 10:11:31 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-04-17 08:00:03 (GMT) |
commit | aacd4e4a90a3afb23d681063d2ecba719f1adab8 (patch) | |
tree | 7e1a884cb47519099bd5db178681773f82dad688 /Source/cmLocalGenerator.cxx | |
parent | 9a450bcfec5411169007d5ca5f1bd40e6f476ff4 (diff) | |
download | CMake-aacd4e4a90a3afb23d681063d2ecba719f1adab8.zip CMake-aacd4e4a90a3afb23d681063d2ecba719f1adab8.tar.gz CMake-aacd4e4a90a3afb23d681063d2ecba719f1adab8.tar.bz2 |
Refactoring: add cm::contains to <cmext/algorithm>
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ca84f1e..e07cbb0 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -20,7 +20,6 @@ #include "cmsys/RegularExpression.hxx" -#include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" #include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" @@ -1255,7 +1254,7 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( // directly. In this case adding -I/usr/include can hide SDK headers so we // must still exclude it. if ((lang == "C" || lang == "CXX" || lang == "CUDA") && - !cmContains(impDirVec, "/usr/include") && + !cm::contains(impDirVec, "/usr/include") && std::find_if(impDirVec.begin(), impDirVec.end(), [](std::string const& d) { return cmHasLiteralSuffix(d, "/usr/include"); @@ -1276,13 +1275,14 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( &lang](std::string const& dir) { return ( // Do not exclude directories that are not in an excluded set. - ((!cmContains(implicitSet, this->GlobalGenerator->GetRealPath(dir))) && - (!cmContains(implicitExclude, dir))) + ((!cm::contains(implicitSet, this->GlobalGenerator->GetRealPath(dir))) && + (!cm::contains(implicitExclude, dir))) // Do not exclude entries of the CPATH environment variable even though // they are implicitly searched by the compiler. They are meant to be // user-specified directories that can be re-ordered or converted to // -isystem without breaking real compiler builtin headers. - || ((lang == "C" || lang == "CXX") && cmContains(this->EnvCPATH, dir))); + || + ((lang == "C" || lang == "CXX") && cm::contains(this->EnvCPATH, dir))); }; // Get the target-specific include directories. @@ -1329,7 +1329,7 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( if (!stripImplicitDirs) { // Append implicit directories that were requested by the user only for (BT<std::string> const& udr : userDirs) { - if (cmContains(implicitSet, cmSystemTools::GetRealPath(udr.Value))) { + if (cm::contains(implicitSet, cmSystemTools::GetRealPath(udr.Value))) { emitBT(udr); } } |