[cmake-developers] Issue on CMAKE_OSX_SYSROOT

Gregor Jasny gjasny at googlemail.com
Sun Oct 11 06:17:30 EDT 2015


Hi Francesco,

On 10/10/15 14:34, Gregor Jasny wrote:
> On 06/10/15 16:00, Brad King wrote:
>> Okay, that looks like the underlying issue.  The
>> Modules/Platform/Darwin-Initialize.cmake module will have
>> to be taught about this case to do the right thing by default
>> if it does not already.

> if (SDK is newer than host) && (is not set CMAKE_OSX_DEPLOYMENT_TARGET)
>   set CMAKE_OSX_DEPLOYMENT_TARGET=<host version>
> endif()

Could you please give the following patch to Darwin-Initialize.cmake a try?

https://cmake.org/gitweb?p=stage/cmake.git;a=commit;h=d61c6689c7380c810e060fed6bf3a0b9fbfd41d0

Brad: If we would set in line 33 the CMAKE_OSX_DEPLOYMENT_TARGET cache
variable only if ENV{MACOSX_DEPLOYMENT_TARGET} actually exists we could
get rid of the FORCE attribute later. Would that make sense?

Thanks,
Gregor


More information about the cmake-developers mailing list