diff options
author | Brad King <brad.king@kitware.com> | 2002-12-12 16:36:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-12-12 16:36:28 (GMT) |
commit | 54541bd40a6083b3969c2e2dc53292d1a67b69c2 (patch) | |
tree | af5a806a88d11cc4cf8e6779d0ad7a8610d442e8 /Source/cmMakefile.cxx | |
parent | fe26cf51f575b30299f1ecfff112cf095a5c6f48 (diff) | |
download | CMake-54541bd40a6083b3969c2e2dc53292d1a67b69c2.zip CMake-54541bd40a6083b3969c2e2dc53292d1a67b69c2.tar.gz CMake-54541bd40a6083b3969c2e2dc53292d1a67b69c2.tar.bz2 |
ENH: Improved filename/line number reporting in error message. Macro invocations now chain up the error message.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index db4a1ba..8c44fb8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -156,13 +156,15 @@ bool cmMakefile::CommandExists(const char* name) const { return m_LocalGenerator->GetGlobalGenerator()->GetCMakeInstance()->CommandExists(name); } - -void cmMakefile::ExecuteCommand(const cmListFileFunction& lff) + +bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff) { + bool result = true; // quick return if blocked if(this->IsFunctionBlocked(lff)) { - return; + // No error. + return result; } std::string name = lff.m_Name; // execute the command @@ -186,6 +188,7 @@ void cmMakefile::ExecuteCommand(const cmListFileFunction& lff) << lff.m_FilePath << ":" << lff.m_Line << ":\n" << usedCommand->GetError(); cmSystemTools::Error(error.str().c_str()); + result = false; } else { @@ -209,7 +212,10 @@ void cmMakefile::ExecuteCommand(const cmListFileFunction& lff) << lff.m_FilePath << ":" << lff.m_Line << ":\n" << "Unknown CMake command \"" << lff.m_Name.c_str() << "\"."; cmSystemTools::Error(error.str().c_str()); + result = false; } + + return result; } // Parse the given CMakeLists.txt file into a list of classes. |