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

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to