[cmake-developers] CMake 3.5.2 conflates OSX SDK version with target deployment

Sean McBride sean at rogue-research.com
Wed May 25 14:31:26 EDT 2016


On Sat, 21 May 2016 22:50:41 -0700, James Burgess said:

>If your set CMAKE_OSX_DEPLOYMENT_TARGET in order to get find modules to
>work on Xcode6 or above you get this message:
>
>$ cmake -D CMAKE_OSX_DEPLOYMENT_TARGET=10.8 .
>  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' but the matching SDK does not exist
>  at:
>
>   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
>Developer/SDKs/MacOSX10.8.sdk"
>
>  Instead using SDK:
>
>   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
>Developer/SDKs/MacOSX10.10.sdk".
>Call Stack (most recent call first):
>  /Applications/CMake.app/Contents/share/cmake-3.5/Modules/
>CMakeSystemSpecificInitialize.cmake:18 (include)
>  CMakeLists.txt:25 (project)

It seems to me that if you're going to specify a deployment target explicitly that you should specify an SDK explicitly too.

That aside, if you don't, CMake should probably default to the newest SDK (which is what Xcode does).  I don't see a reason to default to an SDK "matching" the deployment target, in fact it's problematic these days since they no longer provider older SDKs.

Of course, finding the "newest" SDK will be a bit fragile, since they get moved/renamed all the time, but I guess that's something CMake always has to deal with anyway.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the cmake-developers mailing list