summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-29 15:43:12 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-29 15:43:12 (GMT)
commitd1180fc4e1545f98fddd9a51bb2140f04af0730d (patch)
tree3378f2a9d2ad790be32845b6ab711a6d2ad82cfa /Source/cmake.cxx
parent21c7454250982d2cc4abd9d5cfe916f3640dc1ee (diff)
downloadCMake-d1180fc4e1545f98fddd9a51bb2140f04af0730d.zip
CMake-d1180fc4e1545f98fddd9a51bb2140f04af0730d.tar.gz
CMake-d1180fc4e1545f98fddd9a51bb2140f04af0730d.tar.bz2
ENH: Add untaring support
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 5176e10..32cad9a 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -963,6 +963,23 @@ int cmake::CMakeCommand(std::vector<std::string>& args)
return 0;
}
+ // Untar files
+ else if (args[1] == "untar" && args.size() > 3)
+ {
+ std::string outFile = args[2];
+ std::vector<cmStdString> files;
+ for (std::string::size_type cc = 3; cc < args.size(); cc ++)
+ {
+ files.push_back(args[cc]);
+ }
+ if ( !cmSystemTools::ExtractTar(outFile.c_str(), files) )
+ {
+ cmSystemTools::Error("Problem extracting tar: ", outFile.c_str());
+ return 1;
+ }
+ return 0;
+ }
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
// Internal CMake Fortran module support.
else if (args[1] == "cmake_copy_f90_mod" && args.size() >= 4)