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

clinton at elemtech.com clinton at elemtech.com
Wed May 25 14:50:26 EDT 2016



----- On May 25, 2016, at 12:38 PM, Brad King brad.king at kitware.com wrote:

> On 05/25/2016 02:31 PM, Sean McBride wrote:
>> 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.
> 
> This is all worked out in Modules/Platform/Darwin-Initialize.cmake:
> 
>  https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/Darwin-Initialize.cmake;hb=v3.5.2#l38
> 
> The logic there has evolved over the years and is pretty solid now.
> It has good default behavior, and anyone that really needs a specific
> combination can specify it themselves explicitly.
> 
> The only question in this thread is whether the warning about the SDK
> and deployment target version not matching exactly is ever useful:
> 
> https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/Darwin-Initialize.cmake;hb=v3.5.2#l97
> 
> Note that this is separate from the version compatibility check here:
> 
> https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/Darwin.cmake;hb=v3.5.2#l67
> 
> which is an error.
> 
> -Brad

I don't think we need the warning.
A different version for deployment target and SDK is common.

Here
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/Darwin-Initialize.cmake;hb=v3.5.2#l81
the found SDK is equal or newer to the deployment target, which is good.

Clint


More information about the cmake-developers mailing list