summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-18 17:56:02 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-18 18:04:32 (GMT)
commit1dd0eae4fc54e2c15176088ac6b9b7b42802b6f6 (patch)
tree6be96a1f62f53d306b263a71edb2431bed9b04db /Tests
parentacd82e46906cbd53cdce355456e43e224777a4ba (diff)
downloadCMake-1dd0eae4fc54e2c15176088ac6b9b7b42802b6f6.zip
CMake-1dd0eae4fc54e2c15176088ac6b9b7b42802b6f6.tar.gz
CMake-1dd0eae4fc54e2c15176088ac6b9b7b42802b6f6.tar.bz2
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.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt2
-rw-r--r--Tests/CMakeLists.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index c2576f3..7fddf4b 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 8e7c04f..bb83fea 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}")