[cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2

Jack Howarth howarth.mailing.lists at gmail.com
Sun Oct 30 18:28:36 EDT 2016


On Sun, Oct 30, 2016 at 5:38 PM, Gregor Jasny <gjasny at googlemail.com> wrote:
> Hello Howarth,
>
> I'm sorry that I broke your use case with that patch. The problem I have
> with maintaining the Xcode / Darwin code is that it is full of backward
> compatibility and unknown, undocumented use cases. That makes it
> sometimes hard to foresee consequences.

Gregor,
      I would just consider this particular corner case as the
situation where the
user wants to build against the SDK installed at the / level (which is a special
case since it obviously doesn't have an OS release version associated with the
directory location). Thus the obvious set of cmake options that define
that case is...

-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" \
-DCMAKE_OSX_SYSROOT:STRING=/

You have two options to satisfy that combination of options. One is the original
coding prior to your change or my proposed patch which omits any
-isysroot output
for that case. The alternative would be to recode for that combination
and emit '-isysroot /'
The second option is rather redundant so no one ever bothers to do it as the
absence of -isysroot assumes '-isysroot /' for the SDK as the default.
                Jack
ps I would at least go ahead and check in the patch I previously attached
which restores the proper handle for the case of...

-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" \
-DCMAKE_OSX_SYSROOT:STRING=/

which should still do what you want when CMAKE_OSX_DEPLOYMENT_TARGET is set to
an non-null string.
               Jack

>
> On 30/10/2016 19:04, Jack Howarth wrote:
>> Gregor,
>>         This is also a severe regression because if forces the cmake
>> users to build against the 10.12 SDK on 10.11 which is not well tested
>> for backward compatibility on 10.11. Your change makes it impossible
>> to build against the SDK in / installed by the Xcode Command Line
>> Tools package.
>
> What do you mean with SDK installed into "/"? I was under the impression
> that the Command Line Tools package is installed automatically by Xcode
> after first start. I thought it provides the /usr/bin/clang etc.
>
> Thanks,
> Gregor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake.patch
Type: application/octet-stream
Size: 1058 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20161030/08eb9a31/attachment.obj>


More information about the cmake-developers mailing list