From 9436353f9475a6a18e078000d0bb57abea2f395f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 18 Dec 2013 18:47:37 +0100 Subject: [PATCH] Genex: Always return immediately on error. --- Source/cmGeneratorExpressionEvaluator.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index c1d108681..1f30d734c 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -354,6 +354,7 @@ static const struct CCompilerIdNode : public CompilerIdNode reportError(context, content->GetOriginalExpression(), "$ may only be used with targets. It may not " "be used with add_custom_command."); + return std::string(); } return this->EvaluateWithLanguage(parameters, context, content, dagChecker, "C"); @@ -381,6 +382,7 @@ static const struct CXXCompilerIdNode : public CompilerIdNode reportError(context, content->GetOriginalExpression(), "$ may only be used with targets. It may not " "be used with add_custom_command."); + return std::string(); } return this->EvaluateWithLanguage(parameters, context, content, dagChecker, "CXX"); @@ -448,6 +450,7 @@ static const struct CCompilerVersionNode : public CompilerVersionNode reportError(context, content->GetOriginalExpression(), "$ may only be used with targets. It may not " "be used with add_custom_command."); + return std::string(); } return this->EvaluateWithLanguage(parameters, context, content, dagChecker, "C"); @@ -476,6 +479,7 @@ static const struct CxxCompilerVersionNode : public CompilerVersionNode reportError(context, content->GetOriginalExpression(), "$ may only be used with targets. It may " "not be used with add_custom_command."); + return std::string(); } return this->EvaluateWithLanguage(parameters, context, content, dagChecker, "CXX");