mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
RHEL8: Name CPack package _el8 when building in a container
CMAKE_SYSTEM holds the host kernel release, which on the ubuntu-latest runner says nothing about the RHEL8 userland inside the container, so the el8 regex never matched. CPACK_SYSTEM_NAME is only set for Windows, so the fallback appended a bare underscore and the release asset ended up as ResInsight-2026.09.0_.tar.gz. Let the caller state the distribution explicitly and skip the suffix entirely when neither name is known.
This commit is contained in:
1 parent
b16c29b2e8
commit
88119f9c37
2 files changed
+10
-4
No files matched your search
@@ -99,6 +99,7 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/src/cmakebuild/install \
|
||||
-DRESINSIGHT_ENABLE_UNITY_BUILD=false \
|
||||
-DRESINSIGHT_RHEL_SYSTEM_NAME=el8 \
|
||||
-DRESINSIGHT_ENABLE_HDF5=false \
|
||||
-DRESINSIGHT_ENABLE_GRPC=false \
|
||||
-DRESINSIGHT_GCC_STDCPP_EXP_PATH=/opt/libstdcxx-exp/lib \
|
||||
|
||||
@@ -497,8 +497,12 @@ if(${CMAKE_SYSTEM_NAME} MATCHES Windows)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Append el5 when compiled on RHEL5 and el6 if compiled on RHEL6
|
||||
string(REGEX MATCH "el[6,7,8]?" RESINSIGHT_RHEL_SYSTEM_NAME ${CMAKE_SYSTEM})
|
||||
# Append el6/el7/el8 when compiled on RHEL. CMAKE_SYSTEM holds the host kernel
|
||||
# release, which says nothing about the distribution when building inside a
|
||||
# container, so allow the caller to state it explicitly.
|
||||
if(NOT RESINSIGHT_RHEL_SYSTEM_NAME)
|
||||
string(REGEX MATCH "el[6,7,8]?" RESINSIGHT_RHEL_SYSTEM_NAME ${CMAKE_SYSTEM})
|
||||
endif()
|
||||
|
||||
set(RESINSIGHT_PACKAGE_NAME "ResInsight")
|
||||
|
||||
@@ -514,12 +518,13 @@ if(NOT ${OCTAVE_VERSION_STRING} EQUAL "")
|
||||
)
|
||||
endif()
|
||||
|
||||
# Append el5 when compiled on RHEL5 and el6 if compiled on RHEL6
|
||||
# CPACK_SYSTEM_NAME is only set for Windows above, so guard against appending a
|
||||
# bare underscore on platforms where neither name is known.
|
||||
if(NOT "${RESINSIGHT_RHEL_SYSTEM_NAME}" STREQUAL "")
|
||||
set(RESINSIGHT_PACKAGE_NAME
|
||||
"${RESINSIGHT_PACKAGE_NAME}_${RESINSIGHT_RHEL_SYSTEM_NAME}"
|
||||
)
|
||||
else()
|
||||
elseif(NOT "${CPACK_SYSTEM_NAME}" STREQUAL "")
|
||||
set(RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_${CPACK_SYSTEM_NAME}")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in new issue
Block a user