diff options
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index f2f028a..6b3efb5 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -71,7 +71,7 @@ void CMakeCommandUsage(const char* program) << " remove_directory dir - remove a directory and its contents\n" << " rename oldname newname - rename a file or directory " "(on one volume)\n" - << " tar [cxt][vf][zj] file.tar [file/dir1 file/dir2 ...]\n" + << " tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]\n" << " - create or extract a tar or zip archive\n" << " sleep <number>... - sleep for given number of seconds\n" << " time command [args] ... - run command and return elapsed time\n" @@ -735,11 +735,16 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) } bool gzip = false; bool bzip2 = false; + bool xz = false; bool verbose = false; if ( flags.find_first_of('j') != flags.npos ) { bzip2 = true; } + if ( flags.find_first_of('J') != flags.npos ) + { + xz = true; + } if ( flags.find_first_of('z') != flags.npos ) { gzip = true; @@ -760,7 +765,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) else if ( flags.find_first_of('c') != flags.npos ) { if ( !cmSystemTools::CreateTar( - outFile.c_str(), files, gzip, bzip2, verbose) ) + outFile.c_str(), files, gzip, bzip2, xz, verbose) ) { cmSystemTools::Error("Problem creating tar: ", outFile.c_str()); return 1; |