Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
On 31/10/2016 00:03, Gregor Jasny wrote: > On 30/10/2016 18:33, Jack Howarth wrote: >> Gregor, >> Your commit of... >> >> https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b >> >> has caused a major regression in cmake 3.7.0 as it no longer properly >> honors the combination... >> >> -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ > > I think I revert my change and also completely remove the deployment > target mismatch because I cannot see a way to query SDK versions for > Command Line Tools installs. I put my changes into fix-macos-sysroot topic and merged to next. See: https://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/fix-macos-sysroot Thanks, Gregor -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
On 30/10/2016 18:33, Jack Howarth wrote: > Gregor, > Your commit of... > > https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b > > has caused a major regression in cmake 3.7.0 as it no longer properly > honors the combination... > > -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ I think I revert my change and also completely remove the deployment target mismatch because I cannot see a way to query SDK versions for Command Line Tools installs. Thanks, Gregor -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
On 30/10/2016 20:23, Jack Howarth wrote: > Gregor, > While I still think your hack to obtain the versioned SDK is > wrong because it relies on passing invalid arguments to 'xcodebuild > -sdk', the following change restores the expected behavior for > -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ > while allowing your hack to function when > -DCMAKE_OSX_DEPLOYMENT_TARGET is not an empty string... Some questions: 1) Is "xcodebuild -sdk / -version SDKVersion" returning the proper version? I bet not because you called / an invalid argument. 2) Would it make sense to perform some pre-checks before applying my "hack" in case sdk is a path? For example if it starts with the output of "xcode-select --print-path" Thanks, Gregor -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
On Sun, Oct 30, 2016 at 5:38 PM, Gregor Jasny wrote: > Hello Howarth, > > I'm sorry that I broke your use case with that patch. The problem I have > with maintaining the Xcode / Darwin code is that it is full of backward > compatibility and unknown, undocumented use cases. That makes it > sometimes hard to foresee consequences. Gregor, I would just consider this particular corner case as the situation where the user wants to build against the SDK installed at the / level (which is a special case since it obviously doesn't have an OS release version associated with the directory location). Thus the obvious set of cmake options that define that case is... -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" \ -DCMAKE_OSX_SYSROOT:STRING=/ You have two options to satisfy that combination of options. One is the original coding prior to your change or my proposed patch which omits any -isysroot output for that case. The alternative would be to recode for that combination and emit '-isysroot /' The second option is rather redundant so no one ever bothers to do it as the absence of -isysroot assumes '-isysroot /' for the SDK as the default. Jack ps I would at least go ahead and check in the patch I previously attached which restores the proper handle for the case of... -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" \ -DCMAKE_OSX_SYSROOT:STRING=/ which should still do what you want when CMAKE_OSX_DEPLOYMENT_TARGET is set to an non-null string. Jack > > On 30/10/2016 19:04, Jack Howarth wrote: >> Gregor, >> This is also a severe regression because if forces the cmake >> users to build against the 10.12 SDK on 10.11 which is not well tested >> for backward compatibility on 10.11. Your change makes it impossible >> to build against the SDK in / installed by the Xcode Command Line >> Tools package. > > What do you mean with SDK installed into "/"? I was under the impression > that the Command Line Tools package is installed automatically by Xcode > after first start. I thought it provides the /usr/bin/clang etc. > > Thanks, > Gregor cmake.patch Description: Binary data -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
On 30/10/2016 20:37, Jack Howarth wrote: > Proposed fix to restore functionality for > -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ > while retaining the current hack when CMAKE_OSX_DEPLOYMENT_TARGET is > not set to an empty string. Thanks for the patch but it is breaking #16323 again: > ~/src/cmake/_build/bin/cmake > -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk > -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -GXcode .. > -- The C compiler identification is AppleClang 8.0.0.842 > -- The CXX compiler identification is AppleClang 8.0.0.842 > CMake Error at /Users/jasny/src/cmake/Modules/Platform/Darwin.cmake:76 > (message): > CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT: > > > "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" > > is not set to a MacOSX SDK with a recognized version. Either set > CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to > empty. > Call Stack (most recent call first): > /Users/jasny/src/cmake/Modules/CMakeSystemSpecificInformation.cmake:26 > (include) > CMakeLists.txt > > > -- Configuring incomplete, errors occurred! > See also "/Users/jasny/tmp/cm/_build/CMakeFiles/CMakeOutput.log". -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
Hello Howarth, I'm sorry that I broke your use case with that patch. The problem I have with maintaining the Xcode / Darwin code is that it is full of backward compatibility and unknown, undocumented use cases. That makes it sometimes hard to foresee consequences. On 30/10/2016 19:04, Jack Howarth wrote: > Gregor, > This is also a severe regression because if forces the cmake > users to build against the 10.12 SDK on 10.11 which is not well tested > for backward compatibility on 10.11. Your change makes it impossible > to build against the SDK in / installed by the Xcode Command Line > Tools package. What do you mean with SDK installed into "/"? I was under the impression that the Command Line Tools package is installed automatically by Xcode after first start. I thought it provides the /usr/bin/clang etc. Thanks, Gregor -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
One other comment. For new Xcode releases on the prior OS release (eg Xcode 8 on 10.11), the SDK files installed in / by the Command Line Tools are actually those for the 10.11 SDK and *not* those from the 10.12 SDK. This is why the Xcode 8 release lacks a Command Line Tools package for 10.11 (since Swift 3 requires the 10.12 SDK to properly work). So the current code in Modules/Platform/Darwin-Initialize.cmake in cmake 3.7.0-rc2 and proposed patch are both returning non-sensical SDK versions for the SDK in / on 10.11 from 'xcodebuild -sdk'. FYI. On Sun, Oct 30, 2016 at 3:37 PM, Jack Howarth wrote: > Proposed fix to restore functionality for > -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ > while retaining the current hack when CMAKE_OSX_DEPLOYMENT_TARGET is > not set to an empty string. > > On Sun, Oct 30, 2016 at 3:23 PM, Jack Howarth > wrote: >> Gregor, >> While I still think your hack to obtain the versioned SDK is >> wrong because it relies on passing invalid arguments to 'xcodebuild >> -sdk', the following change restores the expected behavior for >> -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ >> while allowing your hack to function when >> -DCMAKE_OSX_DEPLOYMENT_TARGET is not an empty string... >> >> --- cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake.orig >> 2016-10-30 09:45:46.0 -0400 >> +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake >> 2016-10-30 15:16:57.0 -0400 >> @@ -116,7 +116,7 @@ >> set(_CMAKE_OSX_SYSROOT_ORIG "${CMAKE_OSX_SYSROOT}") >> set(_CMAKE_OSX_SYSROOT_PATH "") >> if(CMAKE_OSX_SYSROOT) >> - if("x${CMAKE_OSX_SYSROOT}" MATCHES "/") >> + if("x${CMAKE_OSX_SYSROOT}" MATCHES "/" AND >> CMAKE_OSX_DEPLOYMENT_TARGET MATCHES "") >> # This is a path to the SDK. Make sure it exists. >> if(NOT IS_DIRECTORY "${CMAKE_OSX_SYSROOT}") >>message(WARNING "Ignoring CMAKE_OSX_SYSROOT value:\n >> ${CMAKE_OSX_SYSROOT}\n" >> @@ -125,10 +125,8 @@ >>set(_CMAKE_OSX_SYSROOT_ORIG "") >> endif() >> set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") >> - endif() >> - >> - if(CMAKE_OSX_SYSROOT) >> -# Transform the (maybe unversioned) sysroot into a versioned path. >> + else() >> +# Transform the sdk name into a path. >> execute_process( >>COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >>OUTPUT_VARIABLE _stdout >> >> Jack >> >> On Sun, Oct 30, 2016 at 2:53 PM, Jack Howarth >> wrote: >>> Gregor, >>> The change in >>> https://cmake.org/gitweb?p=cmake.git;a=patch;h=540815eec2b83a8b43689580c54e8950d9f5868b >>> is logically flawed because it allows... >>> >>> COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >>> >>> to be passed ${CMAKE_OSX_SYSROOT} containing "/" which isn't a valid >>> argument for 'xcodebuild -sdk'... >>> >>> $ xcodebuild -sdk / >>> Build settings from command line: >>> SDKROOT = macosx10.12 >>> >>> This erroneously returns macosx10.12 despite the Xcode 7.3.1 Command >>> Line Tools being installed in / containing the 10.11 SDK files. >>> Jack >>> >>> >>> On Sun, Oct 30, 2016 at 2:04 PM, Jack Howarth >>> wrote: Gregor, This is also a severe regression because if forces the cmake users to build against the 10.12 SDK on 10.11 which is not well tested for backward compatibility on 10.11. Your change makes it impossible to build against the SDK in / installed by the Xcode Command Line Tools package. Jack On Sun, Oct 30, 2016 at 1:33 PM, Jack Howarth wrote: > Gregor, > Your commit of... > > https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b > > has caused a major regression in cmake 3.7.0 as it no longer properly > honors the combination... > > -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ > > This is obvious by simple inspection of the code in > Modules/Platform/Darwin-Initialize.cmake as > the code no longer honors -DCMAKE_OSX_SYSROOT:STRING=/. At the very > least, this code > needs to be modified to have cmake emit "-isysroot /" in that case. >IMHO, this issue should be considered a blocker for the cmake > 3,7.0 release on darwin. > Jack > > > On Sun, Oct 30, 2016 at 9:36 AM, Jack Howarth > wrote: >> The change... >> >> --- cmake-3.6.2/Modules/Platform/Darwin-Initialize.cmake 2016-09-07 >> 10:11:58.0 -0400 >> +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake >> 2016-10-19 09:47:45.0 -0400 >> @@ -125,8 +125,10 @@ >>set(_CMAKE_OSX_SYSROOT_ORIG "") >> endif() >> set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") >> - else() >> -# Transform the sdk name into a path. >> + endif() >> + >> + if(CMAKE_OSX_SYSROOT) >> +# Transf
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
Proposed fix to restore functionality for -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ while retaining the current hack when CMAKE_OSX_DEPLOYMENT_TARGET is not set to an empty string. On Sun, Oct 30, 2016 at 3:23 PM, Jack Howarth wrote: > Gregor, > While I still think your hack to obtain the versioned SDK is > wrong because it relies on passing invalid arguments to 'xcodebuild > -sdk', the following change restores the expected behavior for > -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ > while allowing your hack to function when > -DCMAKE_OSX_DEPLOYMENT_TARGET is not an empty string... > > --- cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake.orig > 2016-10-30 09:45:46.0 -0400 > +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake > 2016-10-30 15:16:57.0 -0400 > @@ -116,7 +116,7 @@ > set(_CMAKE_OSX_SYSROOT_ORIG "${CMAKE_OSX_SYSROOT}") > set(_CMAKE_OSX_SYSROOT_PATH "") > if(CMAKE_OSX_SYSROOT) > - if("x${CMAKE_OSX_SYSROOT}" MATCHES "/") > + if("x${CMAKE_OSX_SYSROOT}" MATCHES "/" AND > CMAKE_OSX_DEPLOYMENT_TARGET MATCHES "") > # This is a path to the SDK. Make sure it exists. > if(NOT IS_DIRECTORY "${CMAKE_OSX_SYSROOT}") >message(WARNING "Ignoring CMAKE_OSX_SYSROOT value:\n > ${CMAKE_OSX_SYSROOT}\n" > @@ -125,10 +125,8 @@ >set(_CMAKE_OSX_SYSROOT_ORIG "") > endif() > set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") > - endif() > - > - if(CMAKE_OSX_SYSROOT) > -# Transform the (maybe unversioned) sysroot into a versioned path. > + else() > +# Transform the sdk name into a path. > execute_process( >COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >OUTPUT_VARIABLE _stdout > > Jack > > On Sun, Oct 30, 2016 at 2:53 PM, Jack Howarth > wrote: >> Gregor, >> The change in >> https://cmake.org/gitweb?p=cmake.git;a=patch;h=540815eec2b83a8b43689580c54e8950d9f5868b >> is logically flawed because it allows... >> >> COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >> >> to be passed ${CMAKE_OSX_SYSROOT} containing "/" which isn't a valid >> argument for 'xcodebuild -sdk'... >> >> $ xcodebuild -sdk / >> Build settings from command line: >> SDKROOT = macosx10.12 >> >> This erroneously returns macosx10.12 despite the Xcode 7.3.1 Command >> Line Tools being installed in / containing the 10.11 SDK files. >> Jack >> >> >> On Sun, Oct 30, 2016 at 2:04 PM, Jack Howarth >> wrote: >>> Gregor, >>> This is also a severe regression because if forces the cmake >>> users to build against the 10.12 SDK on 10.11 which is not well tested >>> for backward compatibility on 10.11. Your change makes it impossible >>> to build against the SDK in / installed by the Xcode Command Line >>> Tools package. >>>Jack >>> >>> On Sun, Oct 30, 2016 at 1:33 PM, Jack Howarth >>> wrote: Gregor, Your commit of... https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b has caused a major regression in cmake 3.7.0 as it no longer properly honors the combination... -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ This is obvious by simple inspection of the code in Modules/Platform/Darwin-Initialize.cmake as the code no longer honors -DCMAKE_OSX_SYSROOT:STRING=/. At the very least, this code needs to be modified to have cmake emit "-isysroot /" in that case. IMHO, this issue should be considered a blocker for the cmake 3,7.0 release on darwin. Jack On Sun, Oct 30, 2016 at 9:36 AM, Jack Howarth wrote: > The change... > > --- cmake-3.6.2/Modules/Platform/Darwin-Initialize.cmake 2016-09-07 > 10:11:58.0 -0400 > +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake > 2016-10-19 09:47:45.0 -0400 > @@ -125,8 +125,10 @@ >set(_CMAKE_OSX_SYSROOT_ORIG "") > endif() > set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") > - else() > -# Transform the sdk name into a path. > + endif() > + > + if(CMAKE_OSX_SYSROOT) > +# Transform the (maybe unversioned) sysroot into a versioned path. > execute_process( >COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >OUTPUT_VARIABLE _stdout > > is an obvious mistake in cmake 3.7.0-rc2. The removal of the 'else()' > statement here and the substitution of the ' if(CMAKE_OSX_SYSROOT)' > defeats the prior handling of 'if("x${CMAKE_OSX_SYSROOT}" MATCHES > "/")'. This causes '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" > -DCMAKE_OSX_SYSROOT:STRING=/' to not be honored and -isysroot to be > emitted as a compiler flag universally. > > https://gitlab.kitware.com/cmake/cmake/issues/16394 cmake.patch Description: Binary data -- Powered by ww
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
Gregor, While I still think your hack to obtain the versioned SDK is wrong because it relies on passing invalid arguments to 'xcodebuild -sdk', the following change restores the expected behavior for -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ while allowing your hack to function when -DCMAKE_OSX_DEPLOYMENT_TARGET is not an empty string... --- cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake.orig 2016-10-30 09:45:46.0 -0400 +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake 2016-10-30 15:16:57.0 -0400 @@ -116,7 +116,7 @@ set(_CMAKE_OSX_SYSROOT_ORIG "${CMAKE_OSX_SYSROOT}") set(_CMAKE_OSX_SYSROOT_PATH "") if(CMAKE_OSX_SYSROOT) - if("x${CMAKE_OSX_SYSROOT}" MATCHES "/") + if("x${CMAKE_OSX_SYSROOT}" MATCHES "/" AND CMAKE_OSX_DEPLOYMENT_TARGET MATCHES "") # This is a path to the SDK. Make sure it exists. if(NOT IS_DIRECTORY "${CMAKE_OSX_SYSROOT}") message(WARNING "Ignoring CMAKE_OSX_SYSROOT value:\n ${CMAKE_OSX_SYSROOT}\n" @@ -125,10 +125,8 @@ set(_CMAKE_OSX_SYSROOT_ORIG "") endif() set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") - endif() - - if(CMAKE_OSX_SYSROOT) -# Transform the (maybe unversioned) sysroot into a versioned path. + else() +# Transform the sdk name into a path. execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path OUTPUT_VARIABLE _stdout Jack On Sun, Oct 30, 2016 at 2:53 PM, Jack Howarth wrote: > Gregor, > The change in > https://cmake.org/gitweb?p=cmake.git;a=patch;h=540815eec2b83a8b43689580c54e8950d9f5868b > is logically flawed because it allows... > > COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path > > to be passed ${CMAKE_OSX_SYSROOT} containing "/" which isn't a valid > argument for 'xcodebuild -sdk'... > > $ xcodebuild -sdk / > Build settings from command line: > SDKROOT = macosx10.12 > > This erroneously returns macosx10.12 despite the Xcode 7.3.1 Command > Line Tools being installed in / containing the 10.11 SDK files. > Jack > > > On Sun, Oct 30, 2016 at 2:04 PM, Jack Howarth > wrote: >> Gregor, >> This is also a severe regression because if forces the cmake >> users to build against the 10.12 SDK on 10.11 which is not well tested >> for backward compatibility on 10.11. Your change makes it impossible >> to build against the SDK in / installed by the Xcode Command Line >> Tools package. >>Jack >> >> On Sun, Oct 30, 2016 at 1:33 PM, Jack Howarth >> wrote: >>> Gregor, >>> Your commit of... >>> >>> https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b >>> >>> has caused a major regression in cmake 3.7.0 as it no longer properly >>> honors the combination... >>> >>> -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ >>> >>> This is obvious by simple inspection of the code in >>> Modules/Platform/Darwin-Initialize.cmake as >>> the code no longer honors -DCMAKE_OSX_SYSROOT:STRING=/. At the very >>> least, this code >>> needs to be modified to have cmake emit "-isysroot /" in that case. >>>IMHO, this issue should be considered a blocker for the cmake >>> 3,7.0 release on darwin. >>> Jack >>> >>> >>> On Sun, Oct 30, 2016 at 9:36 AM, Jack Howarth >>> wrote: The change... --- cmake-3.6.2/Modules/Platform/Darwin-Initialize.cmake 2016-09-07 10:11:58.0 -0400 +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake 2016-10-19 09:47:45.0 -0400 @@ -125,8 +125,10 @@ set(_CMAKE_OSX_SYSROOT_ORIG "") endif() set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") - else() -# Transform the sdk name into a path. + endif() + + if(CMAKE_OSX_SYSROOT) +# Transform the (maybe unversioned) sysroot into a versioned path. execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path OUTPUT_VARIABLE _stdout is an obvious mistake in cmake 3.7.0-rc2. The removal of the 'else()' statement here and the substitution of the ' if(CMAKE_OSX_SYSROOT)' defeats the prior handling of 'if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")'. This causes '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/' to not be honored and -isysroot to be emitted as a compiler flag universally. https://gitlab.kitware.com/cmake/cmake/issues/16394 -- 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 ht
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
Gregor, The change in https://cmake.org/gitweb?p=cmake.git;a=patch;h=540815eec2b83a8b43689580c54e8950d9f5868b is logically flawed because it allows... COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path to be passed ${CMAKE_OSX_SYSROOT} containing "/" which isn't a valid argument for 'xcodebuild -sdk'... $ xcodebuild -sdk / Build settings from command line: SDKROOT = macosx10.12 This erroneously returns macosx10.12 despite the Xcode 7.3.1 Command Line Tools being installed in / containing the 10.11 SDK files. Jack On Sun, Oct 30, 2016 at 2:04 PM, Jack Howarth wrote: > Gregor, > This is also a severe regression because if forces the cmake > users to build against the 10.12 SDK on 10.11 which is not well tested > for backward compatibility on 10.11. Your change makes it impossible > to build against the SDK in / installed by the Xcode Command Line > Tools package. >Jack > > On Sun, Oct 30, 2016 at 1:33 PM, Jack Howarth > wrote: >> Gregor, >> Your commit of... >> >> https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b >> >> has caused a major regression in cmake 3.7.0 as it no longer properly >> honors the combination... >> >> -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ >> >> This is obvious by simple inspection of the code in >> Modules/Platform/Darwin-Initialize.cmake as >> the code no longer honors -DCMAKE_OSX_SYSROOT:STRING=/. At the very >> least, this code >> needs to be modified to have cmake emit "-isysroot /" in that case. >>IMHO, this issue should be considered a blocker for the cmake >> 3,7.0 release on darwin. >> Jack >> >> >> On Sun, Oct 30, 2016 at 9:36 AM, Jack Howarth >> wrote: >>> The change... >>> >>> --- cmake-3.6.2/Modules/Platform/Darwin-Initialize.cmake 2016-09-07 >>> 10:11:58.0 -0400 >>> +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake >>> 2016-10-19 09:47:45.0 -0400 >>> @@ -125,8 +125,10 @@ >>>set(_CMAKE_OSX_SYSROOT_ORIG "") >>> endif() >>> set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") >>> - else() >>> -# Transform the sdk name into a path. >>> + endif() >>> + >>> + if(CMAKE_OSX_SYSROOT) >>> +# Transform the (maybe unversioned) sysroot into a versioned path. >>> execute_process( >>>COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >>>OUTPUT_VARIABLE _stdout >>> >>> is an obvious mistake in cmake 3.7.0-rc2. The removal of the 'else()' >>> statement here and the substitution of the ' if(CMAKE_OSX_SYSROOT)' >>> defeats the prior handling of 'if("x${CMAKE_OSX_SYSROOT}" MATCHES >>> "/")'. This causes '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" >>> -DCMAKE_OSX_SYSROOT:STRING=/' to not be honored and -isysroot to be >>> emitted as a compiler flag universally. >>> >>> https://gitlab.kitware.com/cmake/cmake/issues/16394 -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
Gregor, This is also a severe regression because if forces the cmake users to build against the 10.12 SDK on 10.11 which is not well tested for backward compatibility on 10.11. Your change makes it impossible to build against the SDK in / installed by the Xcode Command Line Tools package. Jack On Sun, Oct 30, 2016 at 1:33 PM, Jack Howarth wrote: > Gregor, > Your commit of... > > https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b > > has caused a major regression in cmake 3.7.0 as it no longer properly > honors the combination... > > -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ > > This is obvious by simple inspection of the code in > Modules/Platform/Darwin-Initialize.cmake as > the code no longer honors -DCMAKE_OSX_SYSROOT:STRING=/. At the very > least, this code > needs to be modified to have cmake emit "-isysroot /" in that case. >IMHO, this issue should be considered a blocker for the cmake > 3,7.0 release on darwin. > Jack > > > On Sun, Oct 30, 2016 at 9:36 AM, Jack Howarth > wrote: >> The change... >> >> --- cmake-3.6.2/Modules/Platform/Darwin-Initialize.cmake 2016-09-07 >> 10:11:58.0 -0400 >> +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake >> 2016-10-19 09:47:45.0 -0400 >> @@ -125,8 +125,10 @@ >>set(_CMAKE_OSX_SYSROOT_ORIG "") >> endif() >> set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") >> - else() >> -# Transform the sdk name into a path. >> + endif() >> + >> + if(CMAKE_OSX_SYSROOT) >> +# Transform the (maybe unversioned) sysroot into a versioned path. >> execute_process( >>COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >>OUTPUT_VARIABLE _stdout >> >> is an obvious mistake in cmake 3.7.0-rc2. The removal of the 'else()' >> statement here and the substitution of the ' if(CMAKE_OSX_SYSROOT)' >> defeats the prior handling of 'if("x${CMAKE_OSX_SYSROOT}" MATCHES >> "/")'. This causes '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" >> -DCMAKE_OSX_SYSROOT:STRING=/' to not be honored and -isysroot to be >> emitted as a compiler flag universally. >> >> https://gitlab.kitware.com/cmake/cmake/issues/16394 -- 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
Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
Gregor, Your commit of... https://cmake.org/gitweb?p=cmake.git;a=log;h=540815eec2b83a8b43689580c54e8950d9f5868b has caused a major regression in cmake 3.7.0 as it no longer properly honors the combination... -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ This is obvious by simple inspection of the code in Modules/Platform/Darwin-Initialize.cmake as the code no longer honors -DCMAKE_OSX_SYSROOT:STRING=/. At the very least, this code needs to be modified to have cmake emit "-isysroot /" in that case. IMHO, this issue should be considered a blocker for the cmake 3,7.0 release on darwin. Jack On Sun, Oct 30, 2016 at 9:36 AM, Jack Howarth wrote: > The change... > > --- cmake-3.6.2/Modules/Platform/Darwin-Initialize.cmake 2016-09-07 > 10:11:58.0 -0400 > +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake > 2016-10-19 09:47:45.0 -0400 > @@ -125,8 +125,10 @@ >set(_CMAKE_OSX_SYSROOT_ORIG "") > endif() > set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") > - else() > -# Transform the sdk name into a path. > + endif() > + > + if(CMAKE_OSX_SYSROOT) > +# Transform the (maybe unversioned) sysroot into a versioned path. > execute_process( >COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path >OUTPUT_VARIABLE _stdout > > is an obvious mistake in cmake 3.7.0-rc2. The removal of the 'else()' > statement here and the substitution of the ' if(CMAKE_OSX_SYSROOT)' > defeats the prior handling of 'if("x${CMAKE_OSX_SYSROOT}" MATCHES > "/")'. This causes '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" > -DCMAKE_OSX_SYSROOT:STRING=/' to not be honored and -isysroot to be > emitted as a compiler flag universally. > > https://gitlab.kitware.com/cmake/cmake/issues/16394 -- 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] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2
The change... --- cmake-3.6.2/Modules/Platform/Darwin-Initialize.cmake 2016-09-07 10:11:58.0 -0400 +++ cmake-3.7.0-rc2/Modules/Platform/Darwin-Initialize.cmake 2016-10-19 09:47:45.0 -0400 @@ -125,8 +125,10 @@ set(_CMAKE_OSX_SYSROOT_ORIG "") endif() set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}") - else() -# Transform the sdk name into a path. + endif() + + if(CMAKE_OSX_SYSROOT) +# Transform the (maybe unversioned) sysroot into a versioned path. execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path OUTPUT_VARIABLE _stdout is an obvious mistake in cmake 3.7.0-rc2. The removal of the 'else()' statement here and the substitution of the ' if(CMAKE_OSX_SYSROOT)' defeats the prior handling of 'if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")'. This causes '-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/' to not be honored and -isysroot to be emitted as a compiler flag universally. https://gitlab.kitware.com/cmake/cmake/issues/16394 -- 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