From 85da1c5190974d40dd0079b5d9cecd71c12b8c2a Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Apr 2026 10:29:34 -0400 Subject: [PATCH 1/7] ci: Split macOS job configurations by architecture Prepare to use a different version of Xcode for each host architecture. --- .gitlab/os-macos.yml | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index 3fd5e14e80..c4aff0877d 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -9,11 +9,15 @@ # use so that different versions can be tested in a single pipeline. DEVELOPER_DIR: "/Applications/Xcode-26.3.app/Contents/Developer" +.macos_arm64: + extends: .macos + +.macos_x86_64: + extends: .macos + ### Build and test .macos_build: - extends: .macos - variables: # Note that shell runners only support runners with a single # concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may @@ -22,22 +26,32 @@ # could run at the same time, so we drop it. GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" +.macos_arm64_build: + extends: + - .macos_arm64 + - .macos_build + +.macos_x86_64_build: + extends: + - .macos_x86_64 + - .macos_build + .macos_x86_64_ninja: - extends: .macos_build + extends: .macos_x86_64_build variables: CMAKE_CONFIGURATION: macos_x86_64_ninja CTEST_NO_WARNINGS_ALLOWED: 1 .macos_arm64_ninja: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos_arm64_ninja CTEST_NO_WARNINGS_ALLOWED: 1 .macos_arm64_ninja_symlinked: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos_arm64_ninja_symlinked @@ -46,7 +60,7 @@ CMAKE_CI_BUILD_DIR: "real_work/work/build" .macos_arm64_curl: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos_arm64_curl @@ -59,7 +73,7 @@ CMAKE_CONFIGURATION: macos_arm64_pch .macos_x86_64_makefiles: - extends: .macos_build + extends: .macos_x86_64_build variables: CMAKE_CONFIGURATION: macos_x86_64_makefiles @@ -67,7 +81,7 @@ CMAKE_GENERATOR: "Unix Makefiles" .macos_package: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos_package @@ -75,7 +89,7 @@ CMAKE_CI_NO_INSTALL: 1 .macos10.10_package: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos10.10_package @@ -85,7 +99,7 @@ ### External testing .macos_x86_64_xcode: - extends: .macos + extends: .macos_x86_64 variables: CMAKE_CONFIGURATION: macos_x86_64_xcode @@ -93,7 +107,7 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_arm64_xcode: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_xcode @@ -101,7 +115,7 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_arm64_xcode_symlinked: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_xcode_symlinked @@ -111,7 +125,7 @@ CMAKE_CI_BUILD_DIR: "real_work/work/build" .macos_arm64_xcode_ub: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_xcode_ub @@ -119,7 +133,7 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_arm64_ninja_multi: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_ninja_multi @@ -127,7 +141,7 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_x86_64_ninja_ub: - extends: .macos + extends: .macos_x86_64 variables: CMAKE_CONFIGURATION: macos_x86_64_ninja_ub From 5b32a02230db9a18d21edbfbe0a6a57ed10fcd93 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Apr 2026 10:29:34 -0400 Subject: [PATCH 2/7] ci: Split macOS job configurations by architecture Prepare to use a different version of Xcode for each host architecture. --- .gitlab/os-macos.yml | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index 44033e92b5..9cae318755 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -9,11 +9,15 @@ # use so that different versions can be tested in a single pipeline. DEVELOPER_DIR: "/Applications/Xcode-26.3.app/Contents/Developer" +.macos_arm64: + extends: .macos + +.macos_x86_64: + extends: .macos + ### Build and test .macos_build: - extends: .macos - variables: # Note that shell runners only support runners with a single # concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may @@ -22,8 +26,18 @@ # could run at the same time, so we drop it. GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" +.macos_arm64_build: + extends: + - .macos_arm64 + - .macos_build + +.macos_x86_64_build: + extends: + - .macos_x86_64 + - .macos_build + .macos_x86_64_ninja: - extends: .macos_build + extends: .macos_x86_64_build variables: CMAKE_CONFIGURATION: macos_x86_64_ninja @@ -31,7 +45,7 @@ CTEST_NO_WARNINGS_ALLOWED: 1 .macos_arm64_ninja: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos_arm64_ninja @@ -39,7 +53,7 @@ CTEST_NO_WARNINGS_ALLOWED: 1 .macos_arm64_ninja_symlinked: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos_arm64_ninja_symlinked @@ -54,7 +68,7 @@ CMAKE_CONFIGURATION: macos_arm64_pch .macos_x86_64_makefiles: - extends: .macos_build + extends: .macos_x86_64_build variables: CMAKE_CONFIGURATION: macos_x86_64_makefiles @@ -62,7 +76,7 @@ CMAKE_GENERATOR: "Unix Makefiles" .macos_package: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos_package @@ -70,7 +84,7 @@ CMAKE_CI_NO_INSTALL: 1 .macos10.10_package: - extends: .macos_build + extends: .macos_arm64_build variables: CMAKE_CONFIGURATION: macos10.10_package @@ -80,7 +94,7 @@ ### External testing .macos_x86_64_xcode: - extends: .macos + extends: .macos_x86_64 variables: CMAKE_CONFIGURATION: macos_x86_64_xcode @@ -88,7 +102,7 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_arm64_xcode: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_xcode @@ -96,7 +110,7 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_arm64_xcode_symlinked: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_xcode_symlinked @@ -106,7 +120,7 @@ CMAKE_CI_BUILD_DIR: "real_work/work/build" .macos_arm64_xcode_ub: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_xcode_ub @@ -114,7 +128,7 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_arm64_ninja_multi: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_ninja_multi @@ -122,14 +136,14 @@ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_x86_64_ninja_ub: - extends: .macos + extends: .macos_x86_64 variables: CMAKE_CONFIGURATION: macos_x86_64_ninja_ub CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .macos_arm64_fastbuild: - extends: .macos + extends: .macos_arm64 variables: CMAKE_CONFIGURATION: macos_arm64_fastbuild From aa942cd81f83033fdbab4a8255c77c840e2ac0f8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Apr 2026 11:04:41 -0400 Subject: [PATCH 3/7] CTestCustom: Ignore warnings about zstd objects and libs with no symbols --- CTestCustom.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index d924480117..19695c72ab 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -12,8 +12,8 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning: \\(Long double usage is reported only once for each file" "warning: To disable this warning use" "could not be inlined" - "libcm(curl|expat).*has no symbols" - "cm(curl|expat).build/[^ ]*.o has no symbols" + "libcm(curl|expat|zstd).*has no symbols" + "cm(curl|expat|zstd).build/[^ ]*.o has no symbols" "not sorted slower link editing will result" "stl_deque.h:479" "Utilities.cmzlib." From 8b92847daf1ae67ccf793b1d99b6037a59ef1fb0 Mon Sep 17 00:00:00 2001 From: Gusts Kaksis Date: Thu, 10 Oct 2024 21:22:19 +0300 Subject: [PATCH 4/7] Xcode: Fix target ordering operator to meet std::sort requirements `std::sort` requires strict-weak ordering where `a == b` is false. Backport commit 80d0770250 (Xcode: Fix target ordering operator to meet std::sort requirements, 2024-10-10, v4.0.0-rc1~660^2~1) to CMake 3.31. --- Source/cmGlobalXCodeGenerator.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e691b1eeb5..536a0cb100 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1365,6 +1365,9 @@ struct cmCompareTargets { std::string const& a = l->GetTarget()->GetName(); std::string const& b = r->GetTarget()->GetName(); + if (a == b) { + return false; + } if (a == "ALL_BUILD"_s) { return true; } From 20361a0589fdbcb9e0487c46c320eca46b93dc22 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Apr 2026 14:47:52 -0400 Subject: [PATCH 5/7] Tests/RunCMake/CMP0156: Update for Xcode 26.4 Xcode 26.4 prints additional context at the start of diagnostic lines. --- .../CMP0156-NEW-AppleClang-Imported-build-stdout.txt | 6 ++++-- .../CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt b/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt index c60296760a..3828e20fc9 100644 --- a/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt +++ b/Tests/RunCMake/CMP0156/CMP0156-NEW-AppleClang-Imported-build-stdout.txt @@ -1,3 +1,5 @@ -ld: warning: ignoring duplicate libraries: '[^']*liblib1\.a' +[^ +]*ld: warning: ignoring duplicate libraries: '[^']*liblib1\.a' ld: fatal warning\(s\) induced error \(-fatal_warnings\) -(cc|clang): error: linker command failed with exit code 1 \(use -v to see invocation\) +[^ +]*(cc|clang): error: linker command failed with exit code 1 \(use -v to see invocation\) diff --git a/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt b/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt index 28dfd44a5a..d01e5a92db 100644 --- a/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt +++ b/Tests/RunCMake/CMP0156/CMP0156-OLD-AppleClang-build-stdout.txt @@ -1,3 +1,5 @@ -ld: warning: ignoring duplicate libraries: '[^']*liblib1\.a', '[^']*liblib2\.a' +[^ +]*ld: warning: ignoring duplicate libraries: '[^']*liblib1\.a', '[^']*liblib2\.a' ld: fatal warning\(s\) induced error \(-fatal_warnings\) -(cc|clang): error: linker command failed with exit code 1 \(use -v to see invocation\) +[^ +]*(cc|clang): error: linker command failed with exit code 1 \(use -v to see invocation\) From 56c4fb8b3d0ed4cf4d3e2fbcb97f1cfbab2728a8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Apr 2026 10:39:07 -0400 Subject: [PATCH 6/7] ci: Update macos-arm64 jobs to use Xcode 26.4 Xcode 26.4 will not run on macOS 15.7, and Intel-based hosts cannot be updated past that, so keep macos-x86_64 jobs on Xcode 26.3. --- .gitlab/os-macos.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index c4aff0877d..c0ff828f7a 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -5,15 +5,16 @@ .macos: variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci ext/$CI_CONCURRENT_ID" - # TODO: Factor this out so that each job selects the Xcode version to - # use so that different versions can be tested in a single pipeline. - DEVELOPER_DIR: "/Applications/Xcode-26.3.app/Contents/Developer" .macos_arm64: extends: .macos + variables: + DEVELOPER_DIR: "/Applications/Xcode-26.4.app/Contents/Developer" .macos_x86_64: extends: .macos + variables: + DEVELOPER_DIR: "/Applications/Xcode-26.3.app/Contents/Developer" ### Build and test @@ -170,7 +171,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-arm64 - shell - - xcode-26.3 + - xcode-26.4 - nonconcurrent .macos_arm64_tags_ext: @@ -178,7 +179,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-arm64 - shell - - xcode-26.3 + - xcode-26.4 - concurrent .macos_arm64_tags_package: @@ -186,7 +187,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-arm64 - shell - - xcode-26.3 + - xcode-26.4 - nonconcurrent - finder From be4f6451f93be4c5ec134412299828ddea328a62 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 3 Apr 2026 08:11:56 -0400 Subject: [PATCH 7/7] Tests/RunCMake/LinkStatic: Update for Xcode 26.4 `libtool` with Xcode 26.4 no longer fails on a missing object file: $ libtool -static -o libfoo.a foo.o missing.o ; echo exit-code=$? libtool: warning: file not found 'missing.o' exit-code=0 as it did with Xcode 26.3 and below: $ libtool -static -o libfoo.a foo.o missing.o ; echo exit-code=$? error: libtool: can't open file: missing.o (No such file or directory) exit-code=1 Use a bad flag instead. --- Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS.cmake | 2 ++ .../RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS_CONFIG.cmake | 2 ++ Tests/RunCMake/LinkStatic/STATIC_LIBRARY_FLAGS.cmake | 2 ++ Tests/RunCMake/LinkStatic/STATIC_LIBRARY_OPTIONS.cmake | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS.cmake b/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS.cmake index f2ef5d1c0c..bdc367f0a8 100644 --- a/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS.cmake +++ b/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS.cmake @@ -4,6 +4,8 @@ enable_language(C) set(obj "${CMAKE_C_OUTPUT_EXTENSION}") if(BORLAND) set(pre -) +elseif(XCODE) + set(pre --badflag=) endif() set(CMAKE_STATIC_LINKER_FLAGS ${pre}BADFLAG${obj}) diff --git a/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS_CONFIG.cmake b/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS_CONFIG.cmake index 5c29274a0a..2f7303805e 100644 --- a/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS_CONFIG.cmake +++ b/Tests/RunCMake/LinkStatic/CMAKE_STATIC_LINKER_FLAGS_CONFIG.cmake @@ -4,6 +4,8 @@ enable_language(C) set(obj "${CMAKE_C_OUTPUT_EXTENSION}") if(BORLAND) set(pre -) +elseif(XCODE) + set(pre --badflag=) endif() # CMAKE_STATIC_LINKER_FLAGS_ variant diff --git a/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_FLAGS.cmake b/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_FLAGS.cmake index d654b4e3f9..07fc6b3d1e 100644 --- a/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_FLAGS.cmake +++ b/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_FLAGS.cmake @@ -4,6 +4,8 @@ enable_language(C) set(obj "${CMAKE_C_OUTPUT_EXTENSION}") if(BORLAND) set(pre -) +elseif(XCODE) + set(pre --badflag=) endif() add_library(StaticLinkFlags STATIC LinkOptionsLib.c) diff --git a/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_OPTIONS.cmake b/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_OPTIONS.cmake index 587af1d96e..dfa8b4f05b 100644 --- a/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_OPTIONS.cmake +++ b/Tests/RunCMake/LinkStatic/STATIC_LIBRARY_OPTIONS.cmake @@ -4,6 +4,8 @@ enable_language(C) set(obj "${CMAKE_C_OUTPUT_EXTENSION}") if(BORLAND) set(pre -) +elseif(XCODE) + set(pre --badflag=) endif() add_library(StaticLinkOptions STATIC LinkOptionsLib.c)