diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-12-06 15:28:16 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2018-12-06 15:28:16 (GMT) |
commit | 31840e363f61c10770a3d22467396c05e7d3d422 (patch) | |
tree | fb61c47267056ecf0017ed02bd66f4069d74f85c | |
parent | 98a39be6cfb7b229ff78f7045c6d5bcd6b6c7509 (diff) | |
download | CMake-31840e363f61c10770a3d22467396c05e7d3d422.zip CMake-31840e363f61c10770a3d22467396c05e7d3d422.tar.gz CMake-31840e363f61c10770a3d22467396c05e7d3d422.tar.bz2 |
file: Fix formatting of error in SIZE sub-command
-rw-r--r-- | Source/cmFileCommand.cxx | 2 | ||||
-rw-r--r-- | Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/file/SIZE-error-does-not-exist.cmake | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 7fc717d..fb8e8d3 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -3630,7 +3630,7 @@ bool cmFileCommand::HandleSizeCommand(std::vector<std::string> const& args) if (!cmSystemTools::FileExists(filename, true)) { std::ostringstream e; - e << "SIZE requested of path that is not readable " << filename; + e << "SIZE requested of path that is not readable:\n " << filename; this->SetError(e.str()); return false; } diff --git a/Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt b/Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt index b797a41..842cf89 100644 --- a/Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt +++ b/Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt @@ -1,5 +1,6 @@ ^CMake Error at SIZE-error-does-not-exist.cmake:[0-9]+ \(file\): - file SIZE requested of path that is not readable - /a/file/that/does-not-exist + file SIZE requested of path that is not readable: + + .*/Tests/RunCMake/file/SIZE-error-does-not-exist-build/does-not-exist Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/SIZE-error-does-not-exist.cmake b/Tests/RunCMake/file/SIZE-error-does-not-exist.cmake index edcc222..ebac737 100644 --- a/Tests/RunCMake/file/SIZE-error-does-not-exist.cmake +++ b/Tests/RunCMake/file/SIZE-error-does-not-exist.cmake @@ -1,3 +1,3 @@ -set(file "/a/file/that/does-not-exist") +set(file "${CMAKE_CURRENT_BINARY_DIR}/does-not-exist") file(SIZE "${file}" CALCULATED_SIZE) |