summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-19 18:35:20 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-19 18:35:20 (GMT)
commitf5c6dfcb1cf767c9196bc0e888af6e82273aa1ab (patch)
tree9d0bc55988453f2e6a1dbd819cd3a50ff84c791c /Source/cmMakefile.cxx
parent0301b8366b1cd0ae39ff92589f75be70746cfe3a (diff)
downloadCMake-f5c6dfcb1cf767c9196bc0e888af6e82273aa1ab.zip
CMake-f5c6dfcb1cf767c9196bc0e888af6e82273aa1ab.tar.gz
CMake-f5c6dfcb1cf767c9196bc0e888af6e82273aa1ab.tar.bz2
When doing try compile disable output
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 106d373..8dea2cb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1342,6 +1342,8 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
const char *projectName, const char *targetName,
const std::vector<std::string> *cmakeArgs)
{
+ bool output = cmSystemTools::GetRunCommandOutput();
+ cmSystemTools::DisableRunCommandOutput();
// does the binary directory exist ? If not create it...
if (!cmSystemTools::FileIsDirectory(bindir))
{
@@ -1367,6 +1369,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
"Internal CMake error, TryCompile bad GlobalGenerator");
// return to the original directory
cmSystemTools::ChangeDirectory(cwd.c_str());
+ if ( output )
+ {
+ cmSystemTools::EnableRunCommandOutput();
+ }
return 1;
}
cm.SetGlobalGenerator(gg);
@@ -1393,6 +1399,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
"Internal CMake error, TryCompile configure of cmake failed");
// return to the original directory
cmSystemTools::ChangeDirectory(cwd.c_str());
+ if ( output )
+ {
+ cmSystemTools::EnableRunCommandOutput();
+ }
return 1;
}
@@ -1402,6 +1412,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
"Internal CMake error, TryCompile generation of cmake failed");
// return to the original directory
cmSystemTools::ChangeDirectory(cwd.c_str());
+ if ( output )
+ {
+ cmSystemTools::EnableRunCommandOutput();
+ }
return 1;
}
@@ -1412,6 +1426,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
targetName);
cmSystemTools::ChangeDirectory(cwd.c_str());
+ if ( output )
+ {
+ cmSystemTools::EnableRunCommandOutput();
+ }
return ret;
}