On 10/03/2015 05:00 AM, Francesco Romano wrote:
> I don't know if this is the right mailing list

This is a good place since it concerns a new OS X release.

> I needed to set the variable `CMAKE_OSX_DEPLOYMENT_TARGET` to 10.10 and this
> was done after the first "project" call.

That should be right, though I cannot say for sure without seeing the code.
Typically we do not have the project code set this value but instead add
it to the CMake command line when building for deployment:

 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10

> elseif("${CMAKE_GENERATOR}" MATCHES Xcode
>        OR CMAKE_OSX_DEPLOYMENT_TARGET
>        OR CMAKE_OSX_ARCHITECTURES MATCHES "[^;]"
>        OR NOT EXISTS "/usr/include/sys/types.h")
> 
> Now, the question is: why the Unix Makefile should  not  need the
> variable "CMAKE_OSX_SYSROOT" but only if the deployment target is not set?
> Shouldn't be correct to set anyway the sysroot (which by the way can be
> easily found because Xcode is present on the machine)?

The Unix Makefiles generator also supports the Xcode command-line tools,
third-party compilers, etc. that all build for the host system.  If you
are explicitly building for deployment then you should specify

 -DCMAKE_OSX_SYSROOT=/path/to/10.10/SDK

The Xcode generator searches for a sysroot even when not using an
explicit deployment target because Xcode always wants one specified
and does not support the pure command-line tools.

-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