Skip to content

Build CMake on macOS if one is not preinstalled #81161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions utils/swift_build_support/swift_build_support/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,9 @@ def build_cmake(self, source_root, build_root):
os.chdir(cwd)
return os.path.join(cmake_build_dir, 'bin', 'cmake')

# Get the path to CMake to use for the build
# This function will not build CMake for Apple platforms.
# For other platforms, this builds CMake if a new enough version is not
# available.
# Get the path to CMake to use for the build, this builds CMake if a new enough
# version is not available.
def get_cmake_path(self, source_root, build_root):
if platform.system() == 'Darwin':
return self.toolchain.cmake

cmake_source_dir = os.path.join(source_root, 'cmake')
if not os.path.isdir(cmake_source_dir):
return self.toolchain.cmake
Expand Down