diff options
author | Brad King <brad.king@kitware.com> | 2020-06-15 13:26:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-15 13:26:54 (GMT) |
commit | 29e9b46ca5b50c6342b6e59ded8041cf1251094d (patch) | |
tree | 8b59de933e2e2f799bdcf2bacb4426d91464fdfc /Source | |
parent | 4d0ff2f3aded0a996c42f5a1213d9cbf05971287 (diff) | |
parent | b9dd072e05cf73969eb6e3306c82c3eaa94cfb9b (diff) | |
download | CMake-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.cxx | 5 |
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 += " && "; |