diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-01-30 16:35:17 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-01-30 16:35:17 (GMT) |
commit | 49085f7fedfe467211129205349edaeb9b195a18 (patch) | |
tree | 3a5bdc8d6c50059d926e20ca7e1052b269cb3783 /Source/cmGlobalGenerator.cxx | |
parent | b32f3b4131294b0d4d8895cecf3bb2df11ff434c (diff) | |
download | CMake-49085f7fedfe467211129205349edaeb9b195a18.zip CMake-49085f7fedfe467211129205349edaeb9b195a18.tar.gz CMake-49085f7fedfe467211129205349edaeb9b195a18.tar.bz2 |
BUG: fixes so that --build-and-test will honor timeouts
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 62d1b2f..e554de7 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,8 +28,6 @@ #include <assert.h> -int cmGlobalGenerator::s_TryCompileTimeout = 0; - cmGlobalGenerator::cmGlobalGenerator() { // By default the .SYMBOLIC dependency is not needed on symbolic rules. @@ -49,6 +47,9 @@ cmGlobalGenerator::cmGlobalGenerator() // Whether an install target is needed. this->InstallTargetEnabled = false; + + // how long to let try compiles run + this->TryCompileTimeout = 0; } cmGlobalGenerator::~cmGlobalGenerator() @@ -808,7 +809,8 @@ int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir, const char* config = mf->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION"); return this->Build(srcdir,bindir,projectName, newTarget.c_str(), - output,makeCommand.c_str(),config,false,true); + output,makeCommand.c_str(),config,false,true, + this->TryCompileTimeout); } std::string cmGlobalGenerator @@ -852,7 +854,8 @@ int cmGlobalGenerator::Build( std::string *output, const char *makeCommandCSTR, const char *config, - bool clean, bool fast) + bool clean, bool fast, + double timeout) { *output += "\nTesting TryCompileWithoutMakefile\n"; @@ -863,7 +866,6 @@ int cmGlobalGenerator::Build( cmSystemTools::ChangeDirectory(bindir); int retVal; - int timeout = cmGlobalGenerator::s_TryCompileTimeout; bool hideconsole = cmSystemTools::GetRunCommandHideConsole(); cmSystemTools::SetRunCommandHideConsole(true); |