diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-20 17:15:56 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-20 17:15:56 (GMT) |
commit | 157e2b4ac3a067107561d4ccc2b08ea3555cce44 (patch) | |
tree | af1a9357c08c2b99ebeabd787e3b5f19bb56e062 /Source/cmGlobalGenerator.cxx | |
parent | 92714311c992a924a249bf9f27820f0512af7013 (diff) | |
download | CMake-157e2b4ac3a067107561d4ccc2b08ea3555cce44.zip CMake-157e2b4ac3a067107561d4ccc2b08ea3555cce44.tar.gz CMake-157e2b4ac3a067107561d4ccc2b08ea3555cce44.tar.bz2 |
Add option of TRY_COMPILE to store the output of compilation so that if the output fails you can display it or store it in the file
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 7 |
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 |