diff options
author | Bartosz Kosiorek <bartosz.kosiorek@tomtom.com> | 2019-03-08 16:04:17 (GMT) |
---|---|---|
committer | Bartosz Kosiorek <bartosz.kosiorek@tomtom.com> | 2019-03-18 16:08:20 (GMT) |
commit | 7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798 (patch) | |
tree | 6fab40bcdd5f6e925700434257fcf90402cc2a89 /Source/cmcmd.cxx | |
parent | b06f8c93e5bc65394fe55b3f7ae923fe296048b3 (diff) | |
download | CMake-7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798.zip CMake-7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798.tar.gz CMake-7c47fd8cd1e7d9aae60412ce7544fdfa82c9e798.tar.bz2 |
cmake: tar: Display warning when no files provided during archive creation
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 f996a3e..0828a16 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1114,6 +1114,10 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) return 1; } } else if (flags.find_first_of('c') != std::string::npos) { + if (files.empty()) { + cmSystemTools::Message("tar: No files or directories specified", + "Warning"); + } if (!cmSystemTools::CreateTar(outFile.c_str(), files, compress, verbose, mtime, format)) { cmSystemTools::Error("Problem creating tar: " + outFile); |