feat(oran_fhlib_5g): update Findxran
Update the Cmake find script for xran to detect K release (11.1.1). Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
This commit is contained in:
committed by
Teodora Vladić
parent
57c4633fd6
commit
5b1f09faf1
@@ -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")
|
|||||||
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
|
|||||||
)
|
)
|
||||||
|
|
||||||
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.*")
|
|||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user