The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15200 
====================================================================== 
Reported By:                Ray Donnelly
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15200
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-10-09 08:24 EDT
Last Modified:              2014-10-09 08:24 EDT
====================================================================== 
Summary:                    Odd quoting issue when mixing single, double and
escaped quotes to COMMAND
Description: 
Using the following CMakeList.txt:

add_executable (blender blender.c)

set(TARGETDIR_VER "C:/Program Files (x86)/Blender/share/blender/2.72")

add_custom_command(
  TARGET blender POST_BUILD MAIN_DEPENDENCY blender
  COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime
files and scripts to ${TARGETDIR_VER}'
)

Using any old blender.c (hello world will do)
And either "MSYS Makefiles" or "MinGW Makefiles" generators (actually I suspect
any Makefile generator at all), we get badly quoted strings in
CMakeFiles/blender.dir/build.make:

/C/cmake-3.0.2-win32-x86/bin/cmake.exe -E echo 'now run: "make install" to copy
runtime files and scripts to "C:/Program Files
(x86)/Blender/share/blender/2.72'"

It seems that the final ' and " have been swapped, which causes:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

Steps to Reproduce: 
unzip quote-problem.7z, and from the MSYS2 shell enter:

/c/cmake-3.0.2-win32-x86/bin/cmake.exe -G'MSYS Makefiles'
make

and observe the error message above.

Additional Information: 
This happens on the officially release 3.0.2 Windows binary and also on MSYS2's
cmake.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-10-09 08:24 Ray Donnelly   New Issue                                    
2014-10-09 08:24 Ray Donnelly   File Added: quote-problem.7z                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to