Files
openairinterface5g/openair3/NRPPA/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

24 lines
801 B
CMake

#set(NRPPA_VERSION 16 78 0)
#make_version(NRPPA_cc ${NRPPA_VERSION})
#add_definitions(-DNRPPA_VERSION=${NRPPA_cc})
#string(REPLACE ";" "." NRPPA_RELEASE "${NRPPA_VERSION}")
#if(NRPPA_RELEASE VERSION_EQUAL "16.78.0")
include(ASN1/38455.cmake)
#else()
# message(FATAL_ERROR "unknown NRPPA_RELEASE ${NRPPA_RELEASE}")
#endif()
run_asn1c(${CMAKE_CURRENT_SOURCE_DIR}/${NRPPA_GRAMMAR}
"NRPPA_"
OUTPUT ${nrppa_source} ${nrppa_headers}
OPTIONS -gen-APER -gen-UPER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps
COMMENT "NRPPA source files"
)
add_library(asn1_nrppa ${nrppa_source})
target_include_directories(asn1_nrppa PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_compile_options(asn1_nrppa PRIVATE -DASN_DISABLE_OER_SUPPORT -w)