summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3bb4082..9a46ab0 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -141,7 +141,8 @@ void cmGlobalGenerator::LocalGenerate()
}
int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
- const char *, const char *target)
+ const char *, const char *target,
+ std::string *output)
{
// now build the test
std::string makeCommand =
@@ -157,7 +158,6 @@ int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
/**
* Run an executable command and put the stdout in output.
*/
- std::string output;
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(bindir);
@@ -172,7 +172,8 @@ int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
makeCommand += " all";
}
int retVal;
- if (!cmSystemTools::RunCommand(makeCommand.c_str(), output, retVal, 0, false))
+
+ if (!cmSystemTools::RunCommand(makeCommand.c_str(), *output, retVal, 0, false))
{
cmSystemTools::Error("Generator: execution of make failed.");
// return to the original directory