[CMake] -E echo doen't handle apostrophes
Brad King
brad.king at kitware.com
Fri Jul 21 09:52:33 EDT 2006
Brandon J. Van Every wrote:
> Using CMake 2.4.2. Here's my mighty CMakeLists.txt:
>
> ADD_CUSTOM_TARGET(test
> COMMAND ${CMAKE_COMMAND} -E echo "It's difficult to handle apostrophes."
> )
>
> I used CCMake under Cygwin to generate the Makefile. It dies thus:
>
> Brandon J. Van Every at kahlo ~/echo
> $ make test
> /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
> /bin/sh: -c: line 1: syntax error: unexpected end of file
> make[3]: *** [test] Error 2
> make[2]: *** [CMakeFiles/test.dir/all] Error 2
> make[1]: *** [CMakeFiles/test.dir/rule] Error 2
> make: *** [test] Error 2
This is not cmake -E, but the Makefile generator. It is not properly
escaping the single quote when it writes the argument to the Makefile
build rule. There are actually a few situations when the generators do
not properly escape everything. Please submit a bug report.
Thanks,
-Brad
More information about the CMake
mailing list