summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-01 12:45:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-01 12:45:13 (GMT)
commit2e8b85b040ebc9bd9f2ec4107a69caf6db311823 (patch)
tree528099890103af430c2d901785fe889b36a5cf97 /Tests
parentcb8c51a08e96e1cd2d02def5c4dc09ec37782ae2 (diff)
parentb6c60f14b6df53d8cb6fe442d801fdae50ddf287 (diff)
downloadCMake-2e8b85b040ebc9bd9f2ec4107a69caf6db311823.zip
CMake-2e8b85b040ebc9bd9f2ec4107a69caf6db311823.tar.gz
CMake-2e8b85b040ebc9bd9f2ec4107a69caf6db311823.tar.bz2
Merge topic 'macos-arm64'
b6c60f14b6 macOS: Default to arm64 architecture on Apple Silicon hosts 383e81aa60 Tests: Teach RunCMake to ignore Xcode internal objc warnings 8f75912176 Tests: Enable Assembler test case when CMAKE_OSX_ARCHITECTURES has one value Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5291
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Assembler/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/RunCMake.cmake1
2 files changed, 7 insertions, 1 deletions
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index a3c9946..a574c4e 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -8,7 +8,7 @@ set(SRCS)
# (at least) the following toolchains can process assembler files directly
# and also generate assembler files from C:
if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode|Ninja" AND
- NOT CMAKE_OSX_ARCHITECTURES)
+ NOT CMAKE_OSX_ARCHITECTURES MATCHES ";")
if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|HP|SunPro|XL)$") OR (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND UNIX)
AND NOT (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC"))
set(C_FLAGS "${CMAKE_C_FLAGS}")
@@ -16,6 +16,11 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode|Ninja" AND
if(CMAKE_OSX_SYSROOT AND CMAKE_C_SYSROOT_FLAG AND NOT ";${C_FLAGS};" MATCHES ";${CMAKE_C_SYSROOT_FLAG};")
list(APPEND C_FLAGS ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT})
endif()
+ if(CMAKE_OSX_ARCHITECTURES)
+ list(APPEND C_FLAGS -arch ${CMAKE_OSX_ARCHITECTURES})
+ elseif("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ list(APPEND C_FLAGS -arch arm64)
+ endif()
# Clang on OS X, and perhaps other compilers, do not support -g
# for both generating and assembling, so drop it from generating.
list(REMOVE_ITEM C_FLAGS -g)
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index c13c694..7d96e50 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -153,6 +153,7 @@ function(run_cmake test)
"|contact PGI Sales at"
"|[^\n]*xcodebuild[^\n]*warning: file type[^\n]*is based on missing file type"
+ "|[^\n]*objc[^\n]*: Class AMSupportURL[^\n]* One of the two will be used. Which one is undefined."
"|[^\n]*is a member of multiple groups"
"|[^\n]*offset in archive not a multiple of 8"
"|[^\n]*from Time Machine by path"