summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-15 13:26:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-15 13:26:54 (GMT)
commit29e9b46ca5b50c6342b6e59ded8041cf1251094d (patch)
tree8b59de933e2e2f799bdcf2bacb4426d91464fdfc /Source
parent4d0ff2f3aded0a996c42f5a1213d9cbf05971287 (diff)
parentb9dd072e05cf73969eb6e3306c82c3eaa94cfb9b (diff)
downloadCMake-29e9b46ca5b50c6342b6e59ded8041cf1251094d.zip
CMake-29e9b46ca5b50c6342b6e59ded8041cf1251094d.tar.gz
CMake-29e9b46ca5b50c6342b6e59ded8041cf1251094d.tar.bz2
Merge topic 'cmake-build-retval'
b9dd072e05 Tests: Add case for cmake --build with a failing target 87c860ebad cmake --build: Fix exit code when building multiple targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4878
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4dc4092..1ed5e8b 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1988,8 +1988,9 @@ int cmGlobalGenerator::Build(
std::string makeCommandStr;
output += "\nRun Build Command(s):";
- for (auto command = makeCommand.begin(); command != makeCommand.end();
- ++command) {
+ retVal = 0;
+ for (auto command = makeCommand.begin();
+ command != makeCommand.end() && retVal == 0; ++command) {
makeCommandStr = command->Printable();
if (command != makeCommand.end()) {
makeCommandStr += " && ";