diff options
author | Johnny Jazeix <jazeix@gmail.com> | 2021-09-18 16:52:28 (GMT) |
---|---|---|
committer | Johnny Jazeix <jazeix@gmail.com> | 2021-09-18 16:54:53 (GMT) |
commit | 0b4a56e64b52ac050e42192c635bd59527cd98b7 (patch) | |
tree | 58f5891fbbf3b16a96ce30234e81beb80751f5d0 /Source/cmcmd.cxx | |
parent | e4ad87c5dd54cc79029bc592db7a3991212ffe4d (diff) | |
download | CMake-0b4a56e64b52ac050e42192c635bd59527cd98b7.zip CMake-0b4a56e64b52ac050e42192c635bd59527cd98b7.tar.gz CMake-0b4a56e64b52ac050e42192c635bd59527cd98b7.tar.bz2 |
cmake: -E cat stops when an empty file is encountered
Fixes: #22652
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 1e0f497..3e36f97 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1068,6 +1068,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args, } else if (!cmSystemTools::FileExists(arg)) { cmSystemTools::Error(arg + ": no such file or directory (ignoring)"); return_value = 1; + } else if (cmSystemTools::FileLength(arg) == 0) { + // Ignore empty files, this is not an error } else { // Destroy console buffers to drop cout/cerr encoding transform. consoleBuf.reset(); |