diff options
author | Isaiah Norton <isaiah.norton@gmail.com> | 2018-11-27 18:23:29 (GMT) |
---|---|---|
committer | Isaiah Norton <isaiah.norton@gmail.com> | 2018-11-27 21:20:43 (GMT) |
commit | 100366a2674a79cdf654dd17a8929fe9ac2e303c (patch) | |
tree | 079afdb45e3180b85bdeb570c5e94537e12377a9 /Source/cmcmd.cxx | |
parent | f49efe283ed005aac642f5af58ea971d468de88c (diff) | |
download | CMake-100366a2674a79cdf654dd17a8929fe9ac2e303c.zip CMake-100366a2674a79cdf654dd17a8929fe9ac2e303c.tar.gz CMake-100366a2674a79cdf654dd17a8929fe9ac2e303c.tar.bz2 |
cmake: add error message when '-E touch' fails
Issue: #16526
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 45881aa..930ced9 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -691,6 +691,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) if (args[1] == "touch" && args.size() > 2) { for (std::string::size_type cc = 2; cc < args.size(); cc++) { if (!cmSystemTools::Touch(args[cc], true)) { + std::cerr << "cmake -E touch: failed to update \""; + std::cerr << args[cc] << "\".\n"; return 1; } } @@ -701,6 +703,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) if (args[1] == "touch_nocreate" && args.size() > 2) { for (std::string::size_type cc = 2; cc < args.size(); cc++) { if (!cmSystemTools::Touch(args[cc], false)) { + std::cerr << "cmake -E touch_nocreate: failed to update \""; + std::cerr << args[cc] << "\".\n"; return 1; } } |