Link targets that need RRC ASN.1 headers to header-only library
Most targets don't need the symbols from the compiled RRC ASN.1 libraries, but only the headers. In particular when compiling individual libraries (e.g., for tests), linking the full library makes the RRC ASN.1 libraries compile and link, when they are not needed (only headers are needed). For libraries that can do without these headers, don't link them.
This commit is contained in:
@@ -33,16 +33,16 @@ include_directories ("/usr/include/X11")
|
||||
add_library(xforms_common OBJECT
|
||||
lte_phy_scope.c
|
||||
../../../executables/stats.c)
|
||||
target_link_libraries(xforms_common PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
|
||||
target_link_libraries(xforms_common PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_library(enbscope MODULE lte_enb_scope.c $<TARGET_OBJECTS:xforms_common>)
|
||||
target_link_libraries(enbscope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
|
||||
target_link_libraries(enbscope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_library(uescope MODULE lte_ue_scope.c $<TARGET_OBJECTS:xforms_common>)
|
||||
target_link_libraries(uescope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
|
||||
target_link_libraries(uescope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_library(nrscope MODULE nr_phy_scope.c)
|
||||
target_link_libraries(nrscope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
|
||||
target_link_libraries(nrscope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
# all libraries should be written to root build dir (default creates the same hierarchie under build as existing for sources)
|
||||
set_target_properties(enbscope uescope nrscope
|
||||
|
||||
@@ -33,13 +33,11 @@
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/phy_extern_ue.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OPT/opt.h" // to test OPT
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#define RF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user