diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-03-12 16:40:34 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-03-12 16:40:34 (GMT) |
commit | 03f3411c4f56f7cd952a971206e2c5c20a027860 (patch) | |
tree | c11b93a039817396d4e16713dc38a14777eb8594 /Source/cmake.cxx | |
parent | fb38af53c0536de7abda7f9a5eea2527f087caf1 (diff) | |
download | CMake-03f3411c4f56f7cd952a971206e2c5c20a027860.zip CMake-03f3411c4f56f7cd952a971206e2c5c20a027860.tar.gz CMake-03f3411c4f56f7cd952a971206e2c5c20a027860.tar.bz2 |
ENH: small enchancement for bug 3776.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6f6c4cd..670fed7 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -800,7 +800,8 @@ void CMakeCommandUsage(const char* program) << " echo_append [string]... - displays arguments as text but no new" " line\n" << " environment - display the current enviroment\n" - << " remove file1 file2 ... - remove the file(s)\n" + << " make_directory dir - create a directory\n" + << " remeove file1 file2 ... - remove the file(s)\n" << " tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar.\n" << " time command [args] ... - run command and return elapsed time\n" #if defined(_WIN32) && !defined(__CYGWIN__) @@ -912,6 +913,17 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args) return 0; } #endif + + if (args[1] == "make_directory" && args.size() == 3) + { + if(!cmSystemTools::MakeDirectory(args[2].c_str())) + { + std::cerr << "Error making directory \"" << args[2].c_str() + << "\".\n"; + return 1; + } + return 0; + } // Remove file else if (args[1] == "remove" && args.size() > 2) |