[cmake-developers] [CMake 0013694]: CMAKE_OSX_SYSROOT isn't quoted, breaking builds when the SDK path contains a space

Mantis Bug Tracker mantis at public.kitware.com
Fri Nov 16 19:03:50 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13694 
====================================================================== 
Reported By:                Jevin Sweval
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13694
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-11-16 19:03 EST
Last Modified:              2012-11-16 19:03 EST
====================================================================== 
Summary:                    CMAKE_OSX_SYSROOT isn't quoted, breaking builds when
the SDK path contains a space
Description: 
CMAKE_OSX_SYSROOT is eventually consumed by
cmLocalGenerator::AddArchitectureFlags which will generate something like
'-isysroot $SYSROOT'

I keep multiple versions of Xcode around in /Applications/Xcode $version.app/ so
the sysroot path will contain a space.

The fix (for my case) is to wrap the sysroot path in quotes like so: '-isysroot
"$SYSROOT"'

I can't imagine that this would break anything, and can only help.

I have applied a patch here https://github.com/jevinskie/cmake/commits/master

Steps to Reproduce: 
1) Rename your Xcode.app folder such that it contains a space.
2) Try to build something
3) The build fails because the sysroot path was not properly quoted.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-11-16 19:03 Jevin Sweval   New Issue                                    
======================================================================




More information about the cmake-developers mailing list