[cmake-developers] Issue on CMAKE_OSX_SYSROOT

Francesco Romano francesco.romano.1987 at gmail.com
Mon Oct 12 11:15:10 EDT 2015


Hi
Sorry for the delay.

I tried it and it worked.
Thanks guys!

Francesco


> On 12 Oct 2015, at 17:00, Brad King <brad.king at kitware.com> wrote:
> 
> On 10/11/2015 06:17 AM, Gregor Jasny wrote:
>>> if (SDK is newer than host) && (is not set CMAKE_OSX_DEPLOYMENT_TARGET)
>>>  set CMAKE_OSX_DEPLOYMENT_TARGET=<host version>
>>> endif()
> 
> That logic looks right to me.
> 
>> 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
> 
> Francesco, does that resolve this for you?
> 
>> 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?
> 
> The reason it is cached there is so that the initial selection is
> cached persistently across runs.  One could refactor the logic to
> use a normal variable at first and then cache the value later
> once the final value is selected.
> 
> I think the FORCE approach is a good fixup to backport to 3.4.
> The rest of the refactoring can be done in 'master' only, please.
> 
> Thanks,
> -Brad
> 



More information about the cmake-developers mailing list