Re: [cmake-developers] the default value in CMake 3.5.2 for CMAKE_OSX_DEPLOYMENT_TARGET is too low for Xcode6

2016-05-23 Thread James Burgess
Hi Brad,
 Apologies, I didn’t look closely enough/didn’t understand that the discovery 
modules would be under influence of CMAKE_OSX_DEPLOYMENT_TARGET set from the 
CMakeFiles.txt, makes total sense now that you said that.

This is the doxygen project, I just did a git clone of their latest. Their 
CMakeLists.txt file is the problem, it has:

if (${CMAKE_SYSTEM} MATCHES "Darwin")
set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 
${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 
${CMAKE_C_FLAGS}”)
...
endif()

If I'm going to put that in my CMakeList.txt then I don’t think CMake can 
really stop me from shooting myself in the foot.

Cheers,
- James



> On May 23, 2016, at 7:24 AM, Brad King <brad.k...@kitware.com> wrote:
> 
> On 05/22/2016 01:27 AM, James Burgess wrote:
>> If you don’t set this you get 10.5. On any mac with Xcode 6 (7 is the latest)
> 
> CMake's default value for CMAKE_OSX_DEPLOYMENT_TARGET is empty, which results
> in either no -mmacosx-version-min flag being used or in the host OS X version,
> depending on the native build tool behavior for the selected generator.  Might
> this default be coming from project code?
> 
>> a CMake user will see strange problems if they use CMakeList.txt file that 
>> uses
>> a module like Threads or Iconv that compile c++ files as part of their 
>> discovery.
> 
> Please provide a complete CMakeLists.txt file and specify the command line
> of CMake you're using to produce this problem.
> 
> 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

[cmake-developers] CMake 3.5.2 conflates OSX SDK version with target deployment

2016-05-21 Thread James Burgess
If your set CMAKE_OSX_DEPLOYMENT_TARGET in order to get find modules to work on 
Xcode6 or above you get this message:

$ cmake -D CMAKE_OSX_DEPLOYMENT_TARGET=10.8 .
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' but the matching SDK does not exist
  at:

   
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"

  Instead using SDK:

   
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk".
Call Stack (most recent call first):
  
/Applications/CMake.app/Contents/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake:18
 (include)
  CMakeLists.txt:25 (project)


CMake is setting the value of --mmacosx-version-min= to this value. Which SDK 
you have does not need to be the same as the target deployment (which can be 
less than the SDK). That is to say the 10.10sdk can target 10.8, meaning code 
compiled with 10.8 set as the target will run on 10.8, 10.9 and 10.10 machines.

- James-- 

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