[Cmake-commits] CMake branch, master, updated. v3.10.0-rc4-290-gc1a55e3
Kitware Robot
kwrobot at kitware.com
Fri Nov 10 07:35:08 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via c1a55e333f99062530386b51675b9ea3c4bf40c9 (commit)
via 6d20c44f3df2b642235b64ba4be789cd9e2b5362 (commit)
via 18eae3f04db49608348283b4860e9eede69bf0a8 (commit)
via 8bef3e31bddf1ea7ab3fe6a0871e76d52806cfcb (commit)
via e8d0b4312e0454ed3a0787acb2ecbef2c3a364a9 (commit)
from 0d7086e3daa67d6679f5ab01d9b187c333cca627 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1a55e333f99062530386b51675b9ea3c4bf40c9
commit c1a55e333f99062530386b51675b9ea3c4bf40c9
Merge: 6d20c44 8bef3e3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 10 12:34:21 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Nov 10 07:34:24 2017 -0500
Merge topic 'update-kwsys'
8bef3e31 Merge branch 'upstream-KWSys' into update-kwsys
e8d0b431 KWSys 2017-11-09 (40d7b1bb)
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1467
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d20c44f3df2b642235b64ba4be789cd9e2b5362
commit 6d20c44f3df2b642235b64ba4be789cd9e2b5362
Merge: 0d7086e 18eae3f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 10 12:31:11 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Nov 10 07:31:55 2017 -0500
Merge topic 'windows-mt-update-quiet'
18eae3f0 Windows: Do not report manifest tool update notification as failure
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1470
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18eae3f04db49608348283b4860e9eede69bf0a8
commit 18eae3f04db49608348283b4860e9eede69bf0a8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 9 09:37:53 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Nov 9 11:22:00 2017 -0500
Windows: Do not report manifest tool update notification as failure
A diagnostic message added in commit v3.10.0-rc1~59^2 (Windows: Improve
link-time error messages when rc or mt fail, 2017-09-22) incorrectly
reports the `mt /notify_update` special return code as a failure.
Fix the logic to consider the special return codes as success.
Fixes: #17444
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index b4772a9..433caef 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1576,9 +1576,11 @@ std::ostream& operator<<(std::ostream& stream,
stream.flags(flags);
return stream;
}
+
static bool RunCommand(const char* comment, std::vector<std::string>& command,
bool verbose, NumberFormat exitFormat,
- int* retCodeOut = nullptr)
+ int* retCodeOut = nullptr,
+ bool (*retCodeOkay)(int) = nullptr)
{
if (verbose) {
std::cout << comment << ":\n";
@@ -1588,18 +1590,17 @@ static bool RunCommand(const char* comment, std::vector<std::string>& command,
int retCode = 0;
bool commandResult = cmSystemTools::RunSingleCommand(
command, &output, &output, &retCode, nullptr, cmSystemTools::OUTPUT_NONE);
- bool returnValue;
+ bool const retCodeSuccess =
+ retCode == 0 || (retCodeOkay && retCodeOkay(retCode));
+ bool const success = commandResult && retCodeSuccess;
if (retCodeOut) {
- if (!commandResult) {
- *retCodeOut = (retCode == 0) ? -1 : retCode;
- } else {
+ if (commandResult || !retCodeOkay) {
*retCodeOut = retCode;
+ } else {
+ *retCodeOut = -1;
}
- returnValue = true; // always return true if retCodeOut is requested
- } else {
- returnValue = commandResult && (retCode == 0);
}
- if (!commandResult || retCode) {
+ if (!success) {
std::cout << comment << ": command \"" << cmJoin(command, " ")
<< "\" failed (exit code "
<< NumberFormatter(exitFormat, retCode)
@@ -1612,7 +1613,7 @@ static bool RunCommand(const char* comment, std::vector<std::string>& command,
std::cout << output;
}
}
- return returnValue;
+ return success;
}
bool cmVSLink::Parse(std::vector<std::string>::const_iterator argBeg,
@@ -1710,6 +1711,13 @@ int cmVSLink::Link()
return LinkNonIncremental();
}
+static bool mtRetIsUpdate(int mtRet)
+{
+ // 'mt /notify_update' returns a special value (differing between
+ // Windows and POSIX hosts) when it updated the manifest file.
+ return mtRet == 0x41020001 || mtRet == 0xbb;
+}
+
int cmVSLink::LinkIncremental()
{
// This follows the steps listed here:
@@ -1781,9 +1789,9 @@ int cmVSLink::LinkIncremental()
// Run the manifest tool to create the final manifest.
int mtRet = this->RunMT("/out:" + this->ManifestFile, true);
- // If mt returns 1090650113 (or 187 on a posix host) then it updated the
- // manifest file so we need to embed it again. Otherwise we are done.
- if (mtRet != 1090650113 && mtRet != 187) {
+ // If mt returns a special value then it updated the manifest file so
+ // we need to embed it again. Otherwise we are done.
+ if (!mtRetIsUpdate(mtRet)) {
return mtRet;
}
@@ -1836,7 +1844,8 @@ int cmVSLink::RunMT(std::string const& out, bool notify)
mtCommand.push_back("/notify_update");
}
int mtRet = 0;
- if (!RunCommand("MT", mtCommand, this->Verbose, FORMAT_HEX, &mtRet)) {
+ if (!RunCommand("MT", mtCommand, this->Verbose, FORMAT_HEX, &mtRet,
+ mtRetIsUpdate)) {
return -1;
}
return mtRet;
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8bef3e31bddf1ea7ab3fe6a0871e76d52806cfcb
commit 8bef3e31bddf1ea7ab3fe6a0871e76d52806cfcb
Merge: 4eefad2 e8d0b43
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 9 08:35:51 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Nov 9 08:35:51 2017 -0500
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2017-11-09 (40d7b1bb)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8d0b4312e0454ed3a0787acb2ecbef2c3a364a9
commit e8d0b4312e0454ed3a0787acb2ecbef2c3a364a9
Author: KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Thu Nov 9 07:51:32 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Nov 9 08:35:50 2017 -0500
KWSys 2017-11-09 (40d7b1bb)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 40d7b1bba6abb1a2aea4c2d46a48968fb31a9d7d (master).
Upstream Shortlog
-----------------
Clinton Stimpson (1):
e9d2b696 SystemTools: Cache only existing path names in GetActualCaseForPath
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 1f7ee10..50aa857 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -27,6 +27,7 @@
#include <iostream>
#include <set>
#include <sstream>
+#include <utility>
#include <vector>
// Work-around CMake dependency scanning limitation. This must
@@ -3372,7 +3373,7 @@ std::string SystemTools::RelativePath(const std::string& local,
}
#ifdef _WIN32
-static std::string GetCasePathName(std::string const& pathIn)
+static std::pair<std::string, bool> GetCasePathName(std::string const& pathIn)
{
std::string casePath;
std::vector<std::string> path_components;
@@ -3381,7 +3382,7 @@ static std::string GetCasePathName(std::string const& pathIn)
{
// Relative paths cannot be converted.
casePath = pathIn;
- return casePath;
+ return std::make_pair(casePath, false);
}
// Start with root component.
@@ -3433,7 +3434,7 @@ static std::string GetCasePathName(std::string const& pathIn)
casePath += path_components[idx];
}
- return casePath;
+ return std::make_pair(casePath, converting);
}
#endif
@@ -3448,12 +3449,14 @@ std::string SystemTools::GetActualCaseForPath(const std::string& p)
if (i != SystemTools::PathCaseMap->end()) {
return i->second;
}
- std::string casePath = GetCasePathName(p);
- if (casePath.size() > MAX_PATH) {
- return casePath;
+ std::pair<std::string, bool> casePath = GetCasePathName(p);
+ if (casePath.first.size() > MAX_PATH) {
+ return casePath.first;
}
- (*SystemTools::PathCaseMap)[p] = casePath;
- return casePath;
+ if (casePath.second) {
+ (*SystemTools::PathCaseMap)[p] = casePath.first;
+ }
+ return casePath.first;
#endif
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmcmd.cxx | 37 +++++++++++++++++++++++--------------
Source/kwsys/SystemTools.cxx | 19 +++++++++++--------
2 files changed, 34 insertions(+), 22 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list