View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003570CMakeCMakepublic2006-08-01 18:292007-06-28 08:50
ReporterBrandon Van Every 
Assigned ToBrad King 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003570: cmake -E echo doesn't handle apostrophes
DescriptionBrandon 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@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
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0005220)
Brad King (manager)
2006-10-04 20:08

This should be fixed by the changes for bug 0003786.
(0007952)
mehdi.rabah (reporter)
2007-06-27 18:37

this bug also make impossible the use of <>, (), and I think many other within add_custom_command.

The same strings can be used within the FILE macro :(

I have cmake 2.4.6 and this bug is still present
(0007953)
Brad King (manager)
2007-06-28 08:50

Are you using the VERBATIM option to ADD_CUSTOM_COMMAND? For compatibility the old behavior had to be preserved for those who worked around this bug by putting in their own escapes. In order to enable the fix one must use the VERBATIM option.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team