string escape sequence depends on macro call nesting level : "\\\${a}" -> "\\\\\\\${a}" -> "\\\\\\\\\\\\\\\${a}"
set(a 123)
macro(test)
message("${ARGV}")
endmacro()
macro(test2)
test("${ARGV}")
endmacro()
macro(test3)
test2("${ARGV}")
endmacro()
If i don't want string to expand i have to write something like this:
test("\\\${a}")
test2("\\\\\\\${a}")
test3("\\\\\\\\\\\\\\\${a}")
Can you fix that ridiculousness? That kind of issues makes the cmake unpredictable and not perspective for programming.
For example, macro still has to be used in places where a function is not desirable:
- system functions hookup
- eval functionality emulation
- 3dparty code
Edited by Andrey