summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-03-12 16:40:34 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-03-12 16:40:34 (GMT)
commit03f3411c4f56f7cd952a971206e2c5c20a027860 (patch)
treec11b93a039817396d4e16713dc38a14777eb8594 /Source/cmake.cxx
parentfb38af53c0536de7abda7f9a5eea2527f087caf1 (diff)
downloadCMake-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.cxx14
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)