Skip to content

Commit c5d6e3c

Browse files
authored
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.
1 parent 056ac83 commit c5d6e3c

File tree

1 file changed

+4
-4
lines changed
  • utils/swift_build_support/swift_build_support

1 file changed

+4
-4
lines changed

utils/swift_build_support/swift_build_support/cmake.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ def build_cmake(self, source_root, build_root):
283283
os.chdir(cwd)
284284
return os.path.join(cmake_build_dir, 'bin', 'cmake')
285285

286-
# For Linux only, determine the version of the installed CMake compared to
287-
# the source and build the source if necessary. Returns the path to the
288-
# cmake binary.
286+
# For Linux and FreeBSD only, determine the version of the installed
287+
# CMake compared to the source and build the source if necessary.
288+
# Returns the path to the cmake binary.
289289
def check_cmake_version(self, source_root, build_root):
290-
if platform.system() != 'Linux':
290+
if not platform.system() in ["Linux", "FreeBSD"]:
291291
return
292292

293293
cmake_source_dir = os.path.join(source_root, 'cmake')

0 commit comments

Comments
 (0)