diff options
-rw-r--r-- | Source/cmIfCommand.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index e25502e..ba5bdfb 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. bool cmIfFunctionBlocker:: IsFunctionBlocked(const char *name, const std::vector<std::string> &args, - cmMakefile &) + cmMakefile &mf) { if (!strcmp(name,"ELSE") || !strcmp(name,"ENDIF")) { @@ -51,6 +51,22 @@ IsFunctionBlocked(const char *name, const std::vector<std::string> &args, { return false; } + else if(args.empty()) + { + std::string err = "Empty arguments for "; + err += name; + err += ". Did you mean "; + err += name; + err += "( "; + for(std::vector<std::string>::const_iterator a = m_Args.begin(); + a != m_Args.end();++a) + { + err += *a; + err += " "; + } + err += ")?"; + cmSystemTools::Error(err.c_str()); + } } return true; } |