diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-05-22 12:57:15 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-22 12:57:29 (GMT) |
commit | ad32282a3e6e7ca648f2e4a40410f08f95023df1 (patch) | |
tree | d7b8e6ff32d234233dddd8d3e009aa9086669135 /Source/cmFileCommand.cxx | |
parent | f01e18eb4699df530e310d376e66752fa6c1dedf (diff) | |
parent | a1eb03569d0e82fb6eaf9a11da1960cfa456f5ef (diff) | |
download | CMake-ad32282a3e6e7ca648f2e4a40410f08f95023df1.zip CMake-ad32282a3e6e7ca648f2e4a40410f08f95023df1.tar.gz CMake-ad32282a3e6e7ca648f2e4a40410f08f95023df1.tar.bz2 |
Merge topic 'file-remove-no-empty'
a1eb03569d file: Change REMOVE to ignore empty names
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3349
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index aa8a919..17a6a74 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1404,6 +1404,12 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args, cmMakeRange(args).advance(1)) // Get rid of subcommand { std::string fileName = arg; + if (fileName.empty()) { + std::string const r = recurse ? "REMOVE_RECURSE" : "REMOVE"; + this->Makefile->IssueMessage(MessageType::AUTHOR_WARNING, + "Ignoring empty file name in " + r + "."); + continue; + } if (!cmsys::SystemTools::FileIsFullPath(fileName)) { fileName = this->Makefile->GetCurrentSourceDirectory(); fileName += "/" + arg; |