MantisBT - CMake
View Issue Details
0015040CMakeCMakepublic2014-07-27 04:292015-01-05 08:39
Mojca Miklavec 
Brad King 
normalminoralways
closedfixed 
Apple MacOS X
CMake 3.0 
CMake 3.1CMake 3.1 
0015040: CMake needs to support building against "/" on OS X with a deployment target set
CMake doesn't allow setting -DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" together with -DCMAKE_OSX_SYSROOT="/".

According to an Apple engineer that's a problem/flaw. See also the whole discussion at
  https://trac.macports.org/ticket/44125 [^]
(If you are able to CC others, please add 'jeremyhu' at macports . org to this ticket.)

I'm attaching his patch that is currently being used in MacPorts:
    https://trac.macports.org/browser/trunk/dports/devel/cmake/files/patch-Modules-Platform-Darwin.cmake.diff?rev=122338 [^]
Run
   cmake -DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" -DCMAKE_OSX_SYSROOT="/" ...
on any CMake-based project. The build always fails, complaining that CMAKE_OSX_SYSROOT should also be set.
No tags attached.
diff patch-Modules-Platform-Darwin.cmake.diff (595) 2014-07-27 04:29
https://public.kitware.com/Bug/file/5200/patch-Modules-Platform-Darwin.cmake.diff
Issue History
2014-07-27 04:29Mojca MiklavecNew Issue
2014-07-27 04:29Mojca MiklavecFile Added: patch-Modules-Platform-Darwin.cmake.diff
2014-07-28 10:04Brad KingNote Added: 0036468
2014-07-28 10:04Brad KingAssigned To => Brad King
2014-07-28 10:04Brad KingStatusnew => resolved
2014-07-28 10:04Brad KingResolutionopen => fixed
2014-07-28 10:04Brad KingFixed in Version => CMake 3.1
2014-07-28 10:04Brad KingTarget Version => CMake 3.1
2015-01-05 08:39Robert MaynardNote Added: 0037593
2015-01-05 08:39Robert MaynardStatusresolved => closed

Notes
(0036468)
Brad King   
2014-07-28 10:04   
Applied, thanks:

 OS X: Allow deployment target with "/" sysroot
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b4faeef [^]
(0037593)
Robert Maynard   
2015-01-05 08:39   
Closing resolved issues that have not been updated in more than 4 months