cmake escapes white space with backslash even inside double quotes
Environment
- cmake version 3.9.4
- macOS High Sierra
To reproduction
-
create CMakeLists file
$ cat CMakeLists.txt add_custom_target(hello_make foo -opt="/Users/foo/Documents/Unreal Projects/MyProject.uproject")
-
run cmake
$ mkdir build ; cd build ; cmake ..
-
It is inside a double quote but is backslash escaped in front of a white space. (Unreal
\
Projects)$ grep foo CMakeFiles/hello_make.dir/build.make foo -opt="/Users/foo/Documents/Unreal\ Projects/MyProject.uproject"
foo command fails because of a backslash.