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

Brad King brad.king at kitware.com
Wed May 25 14:38:35 EDT 2016


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



More information about the cmake-developers mailing list