summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGhsMultiGenerator.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-08-19 12:31:52 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-08-19 18:01:39 (GMT)
commit2dfc52675c3ea732bd389852675e680e296415cb (patch)
tree23ff56e62d180ef60fe92b9e9d01878f9a96c36a /Source/cmGlobalGhsMultiGenerator.cxx
parentc41c79285b5ebb7dd914a6e714aa553bb5078641 (diff)
downloadCMake-2dfc52675c3ea732bd389852675e680e296415cb.zip
CMake-2dfc52675c3ea732bd389852675e680e296415cb.tar.gz
CMake-2dfc52675c3ea732bd389852675e680e296415cb.tar.bz2
cmAlgorithms: Add cmContains
Also, use the new function where applicable.
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 4db829f..c719ff5 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalGhsMultiGenerator.h"
+#include "cmAlgorithms.h"
#include "cmDocumentationEntry.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
@@ -589,16 +590,14 @@ cmGlobalGhsMultiGenerator::GenerateBuildCommand(
/* if multiple top-projects are found in build directory
* then prefer projectName top-project.
*/
- auto p = std::find(files.begin(), files.end(), proj);
- if (p == files.end()) {
+ if (!cmContains(files, proj)) {
proj = files.at(0);
}
}
makeCommand.Add("-top", proj);
if (!targetNames.empty()) {
- if (std::find(targetNames.begin(), targetNames.end(), "clean") !=
- targetNames.end()) {
+ if (cmContains(targetNames, "clean")) {
makeCommand.Add("-clean");
} else {
for (const auto& tname : targetNames) {