diff options
author | Brad King <brad.king@kitware.com> | 2013-10-30 23:12:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-30 23:13:33 (GMT) |
commit | ccdf7e04d451ac9fa877835d7c167b8bbda70686 (patch) | |
tree | 9708dd696f5d867bd263a47ef3594fb081070157 | |
parent | 999abb993e8bd951ec21e10a9d5390734f5d94c6 (diff) | |
download | CMake-ccdf7e04d451ac9fa877835d7c167b8bbda70686.zip CMake-ccdf7e04d451ac9fa877835d7c167b8bbda70686.tar.gz CMake-ccdf7e04d451ac9fa877835d7c167b8bbda70686.tar.bz2 |
macro: Do not substitute for placeholders in bracket arguments
Fix the macro command implementation to avoid substituting macro
placeholders in bracket arguments recorded inside the macro block.
-rw-r--r-- | Source/cmMacroCommand.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index eda82dd..499d3c6 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -140,6 +140,12 @@ bool cmMacroHelperCommand::InvokeInitialPass // Set the FilePath on the arguments to match the function since it is // not stored and the original values may be freed k->FilePath = this->FilePath.c_str(); + if(k->Delim == cmListFileArgument::Bracket) + { + arg.Value = k->Value; + } + else + { tmps = k->Value; // replace formal arguments for (unsigned int j = 1; j < this->Args.size(); ++j) @@ -209,6 +215,7 @@ bool cmMacroHelperCommand::InvokeInitialPass } arg.Value = tmps; + } arg.Delim = k->Delim; arg.FilePath = k->FilePath; arg.Line = k->Line; |