diff options
author | Brad King <brad.king@kitware.com> | 2021-04-14 16:15:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-04-14 17:14:09 (GMT) |
commit | ec1b6157cbfefdcac5c971021a5700dd80318a09 (patch) | |
tree | cf77e28ebb95ce81ec4fa7b91c674bfe62b378cd /Source/cmCTest.cxx | |
parent | eef585efaa49d546a9af2939a147c971c76de03e (diff) | |
download | CMake-ec1b6157cbfefdcac5c971021a5700dd80318a09.zip CMake-ec1b6157cbfefdcac5c971021a5700dd80318a09.tar.gz CMake-ec1b6157cbfefdcac5c971021a5700dd80318a09.tar.bz2 |
Update CMake code using KWSys to account for Status return values
KWSys as of 2021-04-14 changed the return type of `SystemTools`
operations from `bool` to `Status`. Update our call sites.
This may improve error reporting accuracy in a few places.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 0dfd1bd..643b43f 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -4,7 +4,6 @@ #include <algorithm> #include <cctype> -#include <cerrno> #include <chrono> #include <cstdio> #include <cstdlib> @@ -2842,9 +2841,10 @@ int cmCTest::ExecuteTests() cmCTestLog(this, OUTPUT, "Internal ctest changing into directory: " << workDir << std::endl); - if (cmSystemTools::ChangeDirectory(workDir) != 0) { + cmsys::Status status = cmSystemTools::ChangeDirectory(workDir); + if (!status) { auto msg = "Failed to change working directory to \"" + workDir + - "\" : " + std::strerror(errno) + "\n"; + "\" : " + status.GetString() + "\n"; cmCTestLog(this, ERROR_MESSAGE, msg); return 1; } |