From c5d6e3ca05c9c9f8ebf99d2be45b527d2b838d5e Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Thu, 15 Jun 2023 00:04:39 +0100 Subject: [PATCH] swift_build_support cmake.py: allow bootstrapping CMake on FreeBSD A given FreeBSD version may not always have latest CMake installed if any at all. Let's bootstrap it the same way we do it on Linux. --- utils/swift_build_support/swift_build_support/cmake.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/swift_build_support/swift_build_support/cmake.py b/utils/swift_build_support/swift_build_support/cmake.py index 3a82184af2b85..61e255e759fbd 100644 --- a/utils/swift_build_support/swift_build_support/cmake.py +++ b/utils/swift_build_support/swift_build_support/cmake.py @@ -283,11 +283,11 @@ def build_cmake(self, source_root, build_root): os.chdir(cwd) return os.path.join(cmake_build_dir, 'bin', 'cmake') - # For Linux only, determine the version of the installed CMake compared to - # the source and build the source if necessary. Returns the path to the - # cmake binary. + # For Linux and FreeBSD only, determine the version of the installed + # CMake compared to the source and build the source if necessary. + # Returns the path to the cmake binary. def check_cmake_version(self, source_root, build_root): - if platform.system() != 'Linux': + if not platform.system() in ["Linux", "FreeBSD"]: return cmake_source_dir = os.path.join(source_root, 'cmake')