summaryrefslogtreecommitdiffstats
path: root/functions.cmake
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2021-03-06 16:49:29 +0100
committerTor Egge <Tor.Egge@broadpark.no>2021-03-08 10:29:45 +0100
commitc2484d0d257ae148c531b46ec8fe200fe79d33d9 (patch)
tree1d2a03007de9e14fe7e941fb4becf2d8d4e20f26 /functions.cmake
parenta324acb8c5d40c76819da2e0145bac8940e9f749 (diff)
Port to CentOS 8 stream.
Diffstat (limited to 'functions.cmake')
-rw-r--r--functions.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/functions.cmake b/functions.cmake
index 0152554669a..9fa1f326e0a 100644
--- a/functions.cmake
+++ b/functions.cmake
@@ -711,6 +711,10 @@ function(vespa_detect_build_platform)
message(FATAL_ERROR "-- Could not determine ${OS_DISTRO} version")
endif()
endif()
+ file(STRINGS /etc/os-release OS_DISTRO_NAME REGEX "^NAME=")
+ if (OS_DISTRO_NAME)
+ string(REGEX REPLACE "NAME=\"?([^\"]+)\"?" "\\1" OS_DISTRO_NAME ${OS_DISTRO_NAME})
+ endif()
elseif(EXISTS /etc/redhat-release)
set(OS_DISTRO "rhel")
file(STRINGS "/etc/redhat-release" OS_DISTRO_VERSION)
@@ -724,6 +728,9 @@ function(vespa_detect_build_platform)
set(VESPA_OS_DISTRO_VERSION ${OS_DISTRO_VERSION} PARENT_SCOPE)
string(CONCAT OS_DISTRO_COMBINED ${OS_DISTRO} " " ${OS_DISTRO_VERSION})
set(VESPA_OS_DISTRO_COMBINED ${OS_DISTRO_COMBINED} PARENT_SCOPE)
+ if (OS_DISTRO_NAME)
+ set(VESPA_OS_DISTRO_NAME ${OS_DISTRO_NAME} PARENT_SCOPE)
+ endif()
else()
message(FATAL_ERROR "-- Could not determine vespa build platform")
endif()