Files
openairinterface5g/openair2/X2AP/MESSAGES/CMakeLists.txt
T
Robert Schmidt 05d393a399 Encapsulate cmake asn1c call, suppress useless output
Encapsulate the asn1c call from cmake in a cmake function run_asn1c().
As a notable change to the previous manual add_custom_command()
invocation, in suppresses the output of asn1c by default [1] and stores
it in a log file. In case of asn1c4 error, the output will output on
stdout.

Use the new run_asn1c() in all occasions for code generation.

[1] it is quite verbose, with many warnings that we cannot influence nor
suppress, and lists all generated files which is verified by the build
system automatically, anyway.
2025-04-09 14:35:29 +00:00

23 lines
799 B
CMake

set(X2AP_VERSION 15 6 0)
make_version(X2AP_cc ${X2AP_VERSION})
#add_definitions(-DX2AP_VERSION=${X2AP_cc})
string(REPLACE ";" "." X2AP_RELEASE "${X2AP_VERSION}")
if(X2AP_RELEASE VERSION_EQUAL "15.6.0")
include(ASN1/R15/x2ap-15.6.0.cmake)
else()
message(FATAL_ERROR "unknown X2AP_RELEASE ${X2AP_RELEASE}")
endif()
run_asn1c(${CMAKE_CURRENT_SOURCE_DIR}/${X2AP_GRAMMAR}
"X2AP_"
OUTPUT ${x2ap_source} ${x2ap_headers}
OPTIONS -pdu=all -gen-APER -no-gen-BER -no-gen-JER -no-gen-OER -gen-UPER -fcompound-names -no-gen-example -fno-include-deps
COMMENT "X2AP source files"
)
add_library(asn1_x2ap ${x2ap_source})
target_include_directories(asn1_x2ap PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_compile_options(asn1_x2ap PRIVATE -DASN_DISABLE_OER_SUPPORT -w)