INNER CODE UNIT · Python

fetch_cmake

Silverlan/pragma · build_scripts/build.py:260

def fetch_cmake():
	from third_party import cmake
	cmake.main()
	if platform == "win32":
		cmake_exe = "cmake.exe"
	else:
		cmake_exe = "cmake"
	config.cmake_path = str(Path(config.build_tools_dir) / "cmake" / "bin" / cmake_exe)

# At least CMake 4.2.0 is needed, which is still very new and not available in the package managers of
# most distros yet. If the detected CMake version is too old (or none was found), we'll download it here.
# Version 4.3.0 is currently not supported due to: https://gitlab.kitware.com/cmake/cmake/-/issues/27600
use_custom_cmake = False
if not no_build_networking and not check_cmake((4, 2, 0), (4, 2, 3)):
	use_custom_cmake = True
	fetch_cmake()

# Use prebuilt binaries if --build-all is not set

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…