Hi,
I need to pass some unorthodox arguments to the compiler, but without having their special characters escaped, like /wd"1234"
. This works with setting the flags variable globally but not when using target_compile_options()
. It always escapes the special characters. Is there a way to disable this for some values? I took a peek into the cmake source code but it wasn’t obvious to me. Things I tried:
target_compile_options("my_awesome_target" PRIVATE
`echo 1234`
$(echo 1234)
/wd"1234"
"`echo 1234`"
"$(echo 1234)"
"/wd\"1234\""
"\`echo 1234\`"
)
I know the immediate problems these arguments solve can be solved in another way using cmake but the cmake is auto-generated itself so I have limited control over the options passed.
Thanks,
Joel