diff options
author | Brad King <brad.king@kitware.com> | 2021-06-18 13:56:02 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-18 14:04:32 -0400 |
commit | 1dd0eae4fc54e2c15176088ac6b9b7b42802b6f6 (patch) | |
tree | 6be96a1f62f53d306b263a71edb2431bed9b04db | |
parent | acd82e46906cbd53cdce355456e43e224777a4ba (diff) | |
download | cmake-1dd0eae4fc54e2c15176088ac6b9b7b42802b6f6.tar.gz |
Tests: Fix xcode version detection for Xcode 13 on ARM
Running `xcode -version` on an ARM box prints content to stderr:
objc[...]: Class ... is implemented in both...
One of the two will be used. Which one is undefined.
Capture and parse only stdout. Otherwise we might configure test
behavior for the wrong version of Xcode.
-rw-r--r-- | Tests/BuildDepends/Project/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt index c2576f3e3f..7fddf4b03e 100644 --- a/Tests/BuildDepends/Project/CMakeLists.txt +++ b/Tests/BuildDepends/Project/CMakeLists.txt @@ -8,7 +8,7 @@ if(APPLE) else() execute_process( COMMAND xcodebuild -version - OUTPUT_VARIABLE _version ERROR_VARIABLE _version + OUTPUT_VARIABLE _version ERROR_VARIABLE _version_err ) if(_version MATCHES "^Xcode ([0-9]+(\\.[0-9]+)*)") set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}") diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8e7c04fbd0..bb83feab41 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -321,7 +321,7 @@ if(BUILD_TESTING) else() execute_process( COMMAND xcodebuild -version - OUTPUT_VARIABLE _version ERROR_VARIABLE _version + OUTPUT_VARIABLE _version ERROR_VARIABLE _version_err ) if(_version MATCHES "^Xcode ([0-9]+(\\.[0-9]+)*)") set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}") |