summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-04 20:38:47 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-04 20:38:47 (GMT)
commitd35651fb6c59904b3b004474a5501280e694d37c (patch)
tree65c2683c707c50eed4867b52eebae1a204d746f4 /Source/cmGlobalGenerator.cxx
parentf9dd6a38c54c94c24e09e6bec00d1bc9fa9a4023 (diff)
downloadCMake-d35651fb6c59904b3b004474a5501280e694d37c.zip
CMake-d35651fb6c59904b3b004474a5501280e694d37c.tar.gz
CMake-d35651fb6c59904b3b004474a5501280e694d37c.tar.bz2
ENH: Extend GG::Build method for pre-parsed args
This adds an argument to the cmGlobalGenerator::Build method to pass a vector of arguments for the native build tool programatically.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 0103a85..23bb1a2 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1125,7 +1125,8 @@ int cmGlobalGenerator::Build(
bool clean, bool fast,
double timeout,
bool verbose,
- const char* extraOptions)
+ const char* extraOptions,
+ std::vector<std::string> const& nativeOptions)
{
/**
* Run an executable command and put the stdout in output.
@@ -1194,8 +1195,16 @@ int cmGlobalGenerator::Build(
*output += makeCommand;
*output += "\n";
}
-
- if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), outputPtr,
+
+ std::vector<cmStdString> command =
+ cmSystemTools::ParseArguments(makeCommand.c_str());
+ for(std::vector<std::string>::const_iterator ni = nativeOptions.begin();
+ ni != nativeOptions.end(); ++ni)
+ {
+ command.push_back(*ni);
+ }
+
+ if (!cmSystemTools::RunSingleCommand(command, outputPtr,
&retVal, 0, verbose, timeout))
{
cmSystemTools::SetRunCommandHideConsole(hideconsole);