Commit 5b1f09fa authored by Romain Beurdouche's avatar Romain Beurdouche Committed by Teodora Vladić

feat(oran_fhlib_5g): update Findxran

Update the Cmake find script for xran to detect K release (11.1.1).
Signed-off-by: default avatarTeodora Vladić <teodora.vladic@openairinterface.org>
parent 57c4633f
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
# ------- # -------
# #
# Finds the xran library. Note that the library number is as follows: # Finds the xran library. Note that the library number is as follows:
# - oran_bronze_release_v1.1 -> 2.1.1 (B = second letter) # - oran_e_maintenance_release_v1.5 -> 5.1.6
# - oran_e_maintenance_release_v1.0 -> 5.1.0 # - oran_f_release_v1.3 -> 6.1.4
# the version is currently hardcoded to 5.1.0 # - oran_k_release_v1.1 -> 11.1.1
# #
# Required options # Required options
# ^^^^^^^^^^^^^^^^ # ^^^^^^^^^^^^^^^^
...@@ -88,6 +88,8 @@ if (xran_VERSION_STRING MATCHES "^oran_e_maintenance_release_v") ...@@ -88,6 +88,8 @@ if (xran_VERSION_STRING MATCHES "^oran_e_maintenance_release_v")
string(REGEX REPLACE "oran_e_maintenance_release_v([0-9]+).([0-9]+)" "5.\\1.\\2" xran_VERSION ${xran_VERSION_STRING}) string(REGEX REPLACE "oran_e_maintenance_release_v([0-9]+).([0-9]+)" "5.\\1.\\2" xran_VERSION ${xran_VERSION_STRING})
elseif(xran_VERSION_STRING MATCHES "^oran_f_release_v") elseif(xran_VERSION_STRING MATCHES "^oran_f_release_v")
string(REGEX REPLACE "oran_f_release_v([0-9]+).([0-9]+)" "6.\\1.\\2" xran_VERSION ${xran_VERSION_STRING}) string(REGEX REPLACE "oran_f_release_v([0-9]+).([0-9]+)" "6.\\1.\\2" xran_VERSION ${xran_VERSION_STRING})
elseif(xran_VERSION_STRING MATCHES "^oran_k_release_v")
string(REGEX REPLACE "oran_k_release_v([0-9]+).([0-9]+)" "11.\\1.\\2" xran_VERSION ${xran_VERSION_STRING})
elseif(xran_VERSION_STRING MATCHES "^oran_bronze_release_v") elseif(xran_VERSION_STRING MATCHES "^oran_bronze_release_v")
string(REGEX REPLACE "oran_bronze_release_v([0-9]+).([0-9]+)" "2.\\1.\\2" xran_VERSION ${xran_VERSION_STRING}) string(REGEX REPLACE "oran_bronze_release_v([0-9]+).([0-9]+)" "2.\\1.\\2" xran_VERSION ${xran_VERSION_STRING})
else() else()
......
...@@ -19,14 +19,17 @@ add_library(oran_fhlib_5g MODULE ...@@ -19,14 +19,17 @@ add_library(oran_fhlib_5g MODULE
) )
set(F_VERSION 6.1.9) set(F_VERSION 6.1.9)
set(K_VERSION 11.1.1)
find_package(xran REQUIRED) find_package(xran REQUIRED)
if(xran_VERSION VERSION_GREATER_EQUAL 5 AND xran_VERSION VERSION_LESS 6) if(xran_VERSION VERSION_GREATER_EQUAL 5 AND xran_VERSION VERSION_LESS 6)
message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION}") message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION}")
elseif(xran_VERSION VERSION_EQUAL F_VERSION) elseif(xran_VERSION VERSION_EQUAL F_VERSION)
target_compile_definitions(oran_fhlib_5g PRIVATE F_RELEASE) target_compile_definitions(oran_fhlib_5g PRIVATE F_RELEASE)
elseif(xran_VERSION VERSION_EQUAL K_VERSION)
target_compile_definitions(oran_fhlib_5g PRIVATE K_RELEASE)
else() else()
message(FATAL_ERROR "Found xran version ${xran_VERSION} but needed ${F_VERSION} (F release)") message(FATAL_ERROR "Found xran version ${xran_VERSION} but needed ${F_VERSION} (F release) or ${K_VERSION} (K release)")
endif() endif()
# Ignore xran-specific warning: we don't care/can't change the following warning, so suppress # Ignore xran-specific warning: we don't care/can't change the following warning, so suppress
......
...@@ -12,6 +12,8 @@ if(xran_VERSION MATCHES "5.*") ...@@ -12,6 +12,8 @@ if(xran_VERSION MATCHES "5.*")
message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION}") message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION}")
elseif(xran_VERSION VERSION_EQUAL F_VERSION) elseif(xran_VERSION VERSION_EQUAL F_VERSION)
target_compile_definitions(oran_fhlib_5g_mplane PRIVATE F_RELEASE) target_compile_definitions(oran_fhlib_5g_mplane PRIVATE F_RELEASE)
elseif(xran_VERSION VERSION_EQUAL K_VERSION)
target_compile_definitions(oran_fhlib_5g_mplane PRIVATE K_RELEASE)
endif() endif()
# Ignore xran-specific warning: we don't care/can't change the following warning, so suppress # Ignore xran-specific warning: we don't care/can't change the following warning, so suppress
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment