diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2021-01-20 22:59:24 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2021-01-20 23:42:57 +0100 |
commit | 58d2e03879c72a544f6da9c73b23849415ae4730 (patch) | |
tree | 0184eac0292d24fb5110a1f74c71e2c51f15038e /functions.cmake | |
parent | f6e8c6d4ad3cb35ef6135f5caf681d314d85f248 (diff) |
Port to Debian sid.
Diffstat (limited to 'functions.cmake')
-rw-r--r-- | functions.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/functions.cmake b/functions.cmake index bdecc2f5124..0152554669a 100644 --- a/functions.cmake +++ b/functions.cmake @@ -702,7 +702,15 @@ function(vespa_detect_build_platform) file(STRINGS /etc/os-release OS_DISTRO REGEX "^ID=") string(REGEX REPLACE "ID=\"?([^\"]+)\"?" "\\1" OS_DISTRO ${OS_DISTRO}) file(STRINGS /etc/os-release OS_DISTRO_VERSION REGEX "^VERSION_ID=") - string(REGEX REPLACE "VERSION_ID=\"?([^\"]+)\"?" "\\1" OS_DISTRO_VERSION ${OS_DISTRO_VERSION}) + if(OS_DISTRO_VERSION) + string(REGEX REPLACE "VERSION_ID=\"?([^\"]+)\"?" "\\1" OS_DISTRO_VERSION ${OS_DISTRO_VERSION}) + else() + if (OS_DISTRO STREQUAL "debian") + set(OS_DISTRO_VERSION "sid") + else() + message(FATAL_ERROR "-- Could not determine ${OS_DISTRO} version") + endif() + endif() elseif(EXISTS /etc/redhat-release) set(OS_DISTRO "rhel") file(STRINGS "/etc/redhat-release" OS_DISTRO_VERSION) |