Skip to content

Commit 682db94

Browse files
authored
[Build] Fix host system query for older CMake. (#73001)
`DISTRIB_PRETTY_NAME` is only supported on CMake 3.22 and later, but we only require CMake 3.19.6.
1 parent 7bcedc9 commit 682db94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,9 @@ endif()
962962

963963
# Check what linux distribution is being used.
964964
# This can be used to determine the default linker to use.
965-
cmake_host_system_information(RESULT DISTRO_NAME QUERY DISTRIB_PRETTY_NAME)
965+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22")
966+
cmake_host_system_information(RESULT DISTRO_NAME QUERY DISTRIB_PRETTY_NAME)
967+
endif()
966968

967969
# Which default linker to use. Prefer LLVM_USE_LINKER if it set, otherwise use
968970
# our own defaults. This should only be possible in a unified (not stand alone)

0 commit comments

Comments
 (0)