When doing try compile disable output
This commit is contained in:
parent
0301b8366b
commit
f5c6dfcb1c
@ -1342,6 +1342,8 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
|
|||||||
const char *projectName, const char *targetName,
|
const char *projectName, const char *targetName,
|
||||||
const std::vector<std::string> *cmakeArgs)
|
const std::vector<std::string> *cmakeArgs)
|
||||||
{
|
{
|
||||||
|
bool output = cmSystemTools::GetRunCommandOutput();
|
||||||
|
cmSystemTools::DisableRunCommandOutput();
|
||||||
// does the binary directory exist ? If not create it...
|
// does the binary directory exist ? If not create it...
|
||||||
if (!cmSystemTools::FileIsDirectory(bindir))
|
if (!cmSystemTools::FileIsDirectory(bindir))
|
||||||
{
|
{
|
||||||
@ -1367,6 +1369,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
|
|||||||
"Internal CMake error, TryCompile bad GlobalGenerator");
|
"Internal CMake error, TryCompile bad GlobalGenerator");
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
cmSystemTools::ChangeDirectory(cwd.c_str());
|
||||||
|
if ( output )
|
||||||
|
{
|
||||||
|
cmSystemTools::EnableRunCommandOutput();
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
cm.SetGlobalGenerator(gg);
|
cm.SetGlobalGenerator(gg);
|
||||||
@ -1393,6 +1399,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
|
|||||||
"Internal CMake error, TryCompile configure of cmake failed");
|
"Internal CMake error, TryCompile configure of cmake failed");
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
cmSystemTools::ChangeDirectory(cwd.c_str());
|
||||||
|
if ( output )
|
||||||
|
{
|
||||||
|
cmSystemTools::EnableRunCommandOutput();
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1402,6 +1412,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
|
|||||||
"Internal CMake error, TryCompile generation of cmake failed");
|
"Internal CMake error, TryCompile generation of cmake failed");
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
cmSystemTools::ChangeDirectory(cwd.c_str());
|
||||||
|
if ( output )
|
||||||
|
{
|
||||||
|
cmSystemTools::EnableRunCommandOutput();
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1412,6 +1426,10 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
|
|||||||
targetName);
|
targetName);
|
||||||
|
|
||||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
cmSystemTools::ChangeDirectory(cwd.c_str());
|
||||||
|
if ( output )
|
||||||
|
{
|
||||||
|
cmSystemTools::EnableRunCommandOutput();
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user