Re: [cmake-developers] [PATCH v7] For Windows encode process output to internally used encoding

2016-10-30 Thread Dāvis Mosāns
2016-08-17 16:47 GMT+03:00 Brad King :
> I squashed in one warning fix:
>
>  Windows: Encode child process output to internally-used encoding
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12924660
>
> However, then I had to revert the change from `next` because it
> causes the CTest.UpdateGIT test to fail on Windows machines.
> I think the problem is that we run Git with a `-z` option to
> produce binary output.  In such cases we should not do any
> encoding conversions.  cmProcessTools and RunSingleCommand
> will need to gain options for this.

While git's `-z` flag caused test to fail it wasn't because of binary
output (we're still working with text data like commit messages and
file names) but it showed a bug that we would truncate output till
first null byte. `-z` option specifies that git will use null bytes as
separators between entries and it's independent from used text
encoding. We still need to decode git's output (which contains null
bytes) to our internal encoding.

> Also I noticed that if DecodeText buffers partial characters we
> may need a finalize step later to finish them off.  Otherwise
> invalid byte sequences may be dropped if they appear at the end.
>
> Please fetch the above version and revise it as needed.
>

I've fixed it and submitted MR to
https://gitlab.kitware.com/cmake/cmake/merge_requests/221
-- 

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

2016-10-30 Thread Gregor Jasny via cmake-developers
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

2016-10-30 Thread Gregor Jasny via cmake-developers
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

2016-10-30 Thread Gregor Jasny via cmake-developers
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

2016-10-30 Thread Gregor Jasny via cmake-developers
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

2016-10-30 Thread Jack Howarth
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()
>>  

Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2

2016-10-30 Thread Jack Howarth
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

Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2

2016-10-30 Thread Jack Howarth
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: 

Re: [cmake-developers] -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ broken in 3.7.0-rc2

2016-10-30 Thread Jack Howarth
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

2016-10-30 Thread Jack Howarth
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

2016-10-30 Thread Jack Howarth
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

2016-10-30 Thread Jack Howarth
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