diff options
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 45165e5..e5b5443 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -384,7 +384,9 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, // Decide whether to invoke the command. if(pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() && - (!this->GetCMakeInstance()->GetScriptMode() || pcmd->IsScriptable())) + (this->GetCMakeInstance()->GetWorkingMode() != cmake::SCRIPT_MODE + || pcmd->IsScriptable())) + { // if trace is one, print out invoke information if(this->GetCMakeInstance()->GetTrace()) @@ -411,7 +413,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, this->IssueMessage(cmake::FATAL_ERROR, pcmd->GetError()); } result = false; - if ( this->GetCMakeInstance()->GetScriptMode() ) + if ( this->GetCMakeInstance()->GetWorkingMode() != cmake::NORMAL_MODE) { cmSystemTools::SetFatalErrorOccured(); } @@ -422,7 +424,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, this->UsedCommands.push_back(pcmd.release()); } } - else if ( this->GetCMakeInstance()->GetScriptMode() + else if ( this->GetCMakeInstance()->GetWorkingMode() == cmake::SCRIPT_MODE && !pcmd->IsScriptable() ) { std::string error = "Command "; @@ -3025,8 +3027,15 @@ cmCacheManager *cmMakefile::GetCacheManager() const void cmMakefile::DisplayStatus(const char* message, float s) { - this->GetLocalGenerator()->GetGlobalGenerator() - ->GetCMakeInstance()->UpdateProgress(message, s); + cmake* cm = this->GetLocalGenerator()->GetGlobalGenerator() + ->GetCMakeInstance(); + if (cm->GetWorkingMode() == cmake::FIND_PACKAGE_MODE) + { + // don't output any STATUS message in FIND_PACKAGE_MODE, since they will + // directly be fed to the compiler, which will be confused. + return; + } + cm->UpdateProgress(message, s); } std::string cmMakefile::GetModulesFile(const char* filename) |