mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-28 18:09:42 -05:00
Fix: while() reports an error the same way as if()
With arguments list expanded.
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include "cmListFileCache.h"
|
#include "cmListFileCache.h"
|
||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
#include "cmMessageType.h"
|
#include "cmMessageType.h"
|
||||||
|
#include "cmOutputConverter.h"
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
@@ -100,16 +101,13 @@ bool cmWhileFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isTrue && !errorString.empty()) {
|
if (!isTrue && !errorString.empty()) {
|
||||||
std::string err = "had incorrect arguments: ";
|
std::string err = "had incorrect arguments:\n ";
|
||||||
for (cmListFileArgument const& arg : this->Args) {
|
for (cmExpandedCommandArgument const& i : expandedArguments) {
|
||||||
err += (arg.Delim ? "\"" : "");
|
|
||||||
err += arg.Value;
|
|
||||||
err += (arg.Delim ? "\"" : "");
|
|
||||||
err += " ";
|
err += " ";
|
||||||
|
err += cmOutputConverter::EscapeForCMake(i.GetValue());
|
||||||
}
|
}
|
||||||
err += "(";
|
err += "\n";
|
||||||
err += errorString;
|
err += errorString;
|
||||||
err += ").";
|
|
||||||
mf.GetCMakeInstance()->IssueMessage(messageType, err, whileBT);
|
mf.GetCMakeInstance()->IssueMessage(messageType, err, whileBT);
|
||||||
if (messageType == MessageType::FATAL_ERROR) {
|
if (messageType == MessageType::FATAL_ERROR) {
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
CMake Error at unbalanced-parenthesis.cmake:[0-9]+ \(while\):
|
CMake Error at unbalanced-parenthesis.cmake:[0-9]+ \(while\):
|
||||||
had incorrect arguments: NOT \$\{var_with_paren\} IN_LIST some_list
|
had incorrect arguments:
|
||||||
\(mismatched parenthesis in condition\).
|
|
||||||
|
"NOT" "\(" "IN_LIST" "some_list"
|
||||||
|
|
||||||
|
mismatched parenthesis in condition
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
CMakeLists\.txt:[0-9]+ \(include\)
|
CMakeLists\.txt:[0-9]+ \(include\)
|
||||||
|
|||||||
Reference in New Issue
Block a user