diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-15 17:56:07 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-15 17:56:07 (GMT) |
commit | 1777bb502a3c8dbcead54b11fe403e13fe9c225c (patch) | |
tree | e85da2c575bc1e88254287b220e4e236065f3285 /Source/cmakemain.cxx | |
parent | e099dccf4b3772c10c076ec1044dae01da510d28 (diff) | |
download | CMake-1777bb502a3c8dbcead54b11fe403e13fe9c225c.zip CMake-1777bb502a3c8dbcead54b11fe403e13fe9c225c.tar.gz CMake-1777bb502a3c8dbcead54b11fe403e13fe9c225c.tar.bz2 |
BUG: 4244, add a --build option to cmake that can build projects configured by CMake
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 0aaf581..46a17ef 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -85,6 +85,11 @@ static const char * cmDocumentationOptions[][3] = "variables being created. If A is specified, then it will display also " "advanced variables. If H is specified, it will also display help for " "each variable."}, + {"--build dir", "Build a configured cmake tree found in dir.", + "This option will use the native build tool from the command line to" + " build the project. Other options that can be specified with this one" + " are --target, --config, --extra-options, and --clean. For complete " + "help run --build with no options."}, {"-N", "View mode only.", "Only load the cache. Do not actually run configure and generate steps."}, {"-P <file>", "Process script mode.", @@ -407,6 +412,7 @@ int do_cmake(int ac, char** av) bool list_help = false; bool view_only = false; bool script_mode = false; + bool build = false; std::vector<std::string> args; for(int i =0; i < ac; ++i) { @@ -414,6 +420,10 @@ int do_cmake(int ac, char** av) { wiz = true; } + else if(!command && strcmp(av[i], "--build") == 0) + { + return cmake::DoBuild(ac, av); + } else if(!command && strcmp(av[i], "--system-information") == 0) { sysinfo = true; @@ -465,6 +475,11 @@ int do_cmake(int ac, char** av) args.push_back(av[i]); } } + if(build) + { + int ret = cmake::DoBuild(ac, av); + return ret; + } if(command) { int ret = cmake::ExecuteCMakeCommand(args); |