Ver código fonte

cmMakefile: Don't expand bracket arguments in --trace-expand

Bracket arguments are literal and shouldn't be expanded.

Fixes #21671.
Raul Tambre 4 anos atrás
pai
commit
e6e7f2cab9

+ 1 - 1
Source/cmMakefile.cxx

@@ -308,7 +308,7 @@ void cmMakefile::PrintCommandTrace(
 
   args.reserve(lff.Arguments().size());
   for (cmListFileArgument const& arg : lff.Arguments()) {
-    if (expand) {
+    if (expand && arg.Delim != cmListFileArgument::Bracket) {
       temp = arg.Value;
       this->ExpandVariablesInString(temp);
       args.push_back(temp);

+ 1 - 0
Tests/RunCMake/CommandLine/trace-expand.cmake

@@ -0,0 +1 @@
+set(a [[\B]])