diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-10-29 14:45:26 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-10-29 14:45:26 (GMT) |
commit | ac2859aaa36ad25ff71da0a2dae54b84e6378897 (patch) | |
tree | 9cca99401309ebc76c7e5b378d7077856743e33d /Source/cmMakefile.cxx | |
parent | 69dd3218ba0bcdbcf3869f229199df8cd545612f (diff) | |
download | CMake-ac2859aaa36ad25ff71da0a2dae54b84e6378897.zip CMake-ac2859aaa36ad25ff71da0a2dae54b84e6378897.tar.gz CMake-ac2859aaa36ad25ff71da0a2dae54b84e6378897.tar.bz2 |
ENH: Start includding the scripting support
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 178e7ac..d7ec582 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -218,7 +218,9 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff) cmCommand* usedCommand = rm->Clone(); usedCommand->SetMakefile(this); bool keepCommand = false; - if(usedCommand->GetEnabled() && !cmSystemTools::GetFatalErrorOccured()) + if(usedCommand->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() && + (!this->GetCMakeInstance()->GetScriptMode() || + usedCommand->IsScriptable())) { // if not running in inherit mode or // if the command is inherited then InitialPass it. @@ -232,6 +234,10 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff) << usedCommand->GetError(); cmSystemTools::Error(error.str().c_str()); result = false; + if ( this->GetCMakeInstance()->GetScriptMode() ) + { + cmSystemTools::SetFatalErrorOccured(); + } } else { @@ -241,6 +247,16 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff) } } } + else if ( this->GetCMakeInstance()->GetScriptMode() && !usedCommand->IsScriptable() ) + { + cmOStringStream error; + error << "Error in cmake code at\n" + << lff.m_FilePath << ":" << lff.m_Line << ":\n" + << "Command " << usedCommand->GetName() << " not scriptable" << std::endl; + cmSystemTools::Error(error.str().c_str()); + result = false; + cmSystemTools::SetFatalErrorOccured(); + } // if the Cloned command was not used // then delete it if(!keepCommand) @@ -279,7 +295,6 @@ bool cmMakefile::ReadListFile(const char* filename_in, const char* external_in) // e.g. mismatched IF statement std::set<cmFunctionBlocker *> originalBlockers; - const char* external = 0; std::string external_abs; |