The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13595 
====================================================================== 
Reported By:                Matt Coffin
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13595
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-10-17 14:52 EDT
Last Modified:              2012-10-17 14:52 EDT
====================================================================== 
Summary:                    CMAKE_COMMAND handles spaces in path poorly when
used in CMAKE_CXX_LINK_EXECUTABLE
Description: 
When ${CMAKE_COMMAND} is used from within CMAKE_CXX_LINK_EXECUTABLE, spaces in
the pathname are not handled as escape characters, so the executable cannot be
found. This happens when using a custom toolchain most often. The problem is
easily remedied by manually editing link.txt and putting backslashes before the
spaces in the path, but this should really be something that CMake handles
itself, right? Sorry if there's poor formatting or lack of information. I can
grab more info if need be. Its my first bug post.

Steps to Reproduce: 
The following toolchain file for cross-compiling for powerpc-wrs-vxworks will
reproduce the problem nicely. But I suspect any use of ${CMAKE_COMMAND} in
CMAKE_CXX_LINK_EXECUTABLE will reproduce the same problem as it is all about how
spaces are handled when the executable's path is written to link.txt.

The toolchain file can be found at https://github.com/mcoffin/cmake_vxworks.

If you wish to build a cross-compiler environment identical to mine, the patches
for GCC and relevant build scripts are at
https://github.com/rbmj/vxworks-gcc-patches.

WPILib for GCC is at https://github.com/rbmj/wpilib, but I can't imagine that
one would need all of this to reproduce the problem, I'm just simply offering my
setup just in case

Additional Information: 
There is a space by default in the installation path for CMake on OSX, so this
problem will most likely effect all users that installed to the default location
under OSX. I just realized I can attach files, so I'll toss in the "culprit"
link.txt that is generated by that toolchain file. Just look at the last line to
see why the space causes a problem.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-10-17 14:52 Matt Coffin    New Issue                                    
2012-10-17 14:52 Matt Coffin    File Added: link.txt                         
======================================================================

--

Powered by www.kitware.com

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

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

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

Reply via email to