summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-21 15:51:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-21 15:52:06 (GMT)
commitbfe0ea2d98944e3668439b6fb2b05e82a5dca60e (patch)
treea00b27258b23a20c13a81d9525843af2d95faf0d /Source/cmVisualStudio10TargetGenerator.cxx
parent2ad09c5ddd133bc4e543b15eb5e75b6e0aaaf197 (diff)
parent2dfc52675c3ea732bd389852675e680e296415cb (diff)
downloadCMake-bfe0ea2d98944e3668439b6fb2b05e82a5dca60e.zip
CMake-bfe0ea2d98944e3668439b6fb2b05e82a5dca60e.tar.gz
CMake-bfe0ea2d98944e3668439b6fb2b05e82a5dca60e.tar.bz2
Merge topic 'cm-contains'
2dfc52675c cmAlgorithms: Add cmContains Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !3700
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 08378eb..8d4908d 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2603,8 +2603,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
std::string langForClCompile;
if (this->ProjectType == csproj) {
langForClCompile = "CSharp";
- } else if (std::find(cm::cbegin(clLangs), cm::cend(clLangs), linkLanguage) !=
- cm::cend(clLangs)) {
+ } else if (cmContains(clLangs, linkLanguage)) {
langForClCompile = linkLanguage;
} else {
std::set<std::string> languages;
@@ -3470,8 +3469,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
std::vector<std::string> libVec;
std::vector<std::string> vsTargetVec;
this->AddLibraries(cli, libVec, vsTargetVec, config);
- if (std::find(linkClosure->Languages.begin(), linkClosure->Languages.end(),
- "CUDA") != linkClosure->Languages.end() &&
+ if (cmContains(linkClosure->Languages, "CUDA") &&
this->CudaOptions[config] != nullptr) {
switch (this->CudaOptions[config]->GetCudaRuntime()) {
case cmVisualStudioGeneratorOptions::CudaRuntimeStatic:
@@ -3758,8 +3756,7 @@ void cmVisualStudio10TargetGenerator::AddTargetsFileAndConfigPair(
{
for (TargetsFileAndConfigs& i : this->TargetsFileAndConfigsVec) {
if (cmSystemTools::ComparePath(targetsFile, i.File)) {
- if (std::find(i.Configs.begin(), i.Configs.end(), config) ==
- i.Configs.end()) {
+ if (!cmContains(i.Configs, config)) {
i.Configs.push_back(config);
}
return;