[101141] trunk/dports/_resources/port1.0/group/cmake-1.0.tcl

Jeremy Huddleston Sequoia jeremyhu at macports.org
Sat Jan 5 11:41:19 PST 2013


On Jan 5, 2013, at 12:27 AM, Joshua Root <jmr at macports.org> wrote:

>> -            configure.args-append -DCMAKE_OSX_SYSROOT=/
>> +            configure.args-append -DCMAKE_OSX_SYSROOT=/ -DCMAKE_OSX_DEPLOYMENT_TARGET=""
> 
> I notice the uncommitted part of the patch in
> <https://trac.macports.org/ticket/36857> does the opposite, i.e. removes
> the addition of "-DCMAKE_OSX_SYSROOT=/" when configure.sdkroot is empty.
> 
> Does -DCMAKE_OSX_DEPLOYMENT_TARGET="" mean that MACOSX_DEPLOYMENT_TARGET
> is not set when building? Doesn't it default to 10.4 (x86) or 10.1 (ppc)
> in that case?

It defaults to what the compiler would default it to based on the environment and build machine (likely the version of the build machine).

> Does setting MACOSX_DEPLOYMENT_TARGET always cause cmake to want to use
> an SDK,

I should hope not.  That would be a bad bug in cmake.

Of course, I think that cmake complaining about the previous configuration is a bug in cmake, but I can see why someone would do it.  If MACOSX_DEPLOYMENT_TARGET is unset and CMAKE_OSX_SYSROOT is set, cmake sets MACOSX_DEPLOYMENT_TARGET for you to the version of the SDK.

> or only when it's not the same as the build system? The release
> notes seem to be saying that it avoids using an SDK when it isn't
> necessary. Is the error from Darwin.cmake then a leftover that doesn't
> reflect the current behavior?

/shrug … I was just doing what the error recommended as it made sense to me.  If removing CMAKE_OSX_SYSROOT=/ works just as well, I'm all for code removal.  I just wanted to get past build failures ;)

--Jeremy




More information about the macports-dev mailing list