mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
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
This commit is contained in:
@@ -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"
|
||||
@@ -586,16 +587,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) {
|
||||
|
||||
Reference in New Issue
Block a user