fix dependancies in CMakeLists.txt for the T tracer
On some hosts, compilations with the T tracer was failing. The error was: common/utils/T/T.h:15:19: fatal error: T_IDs.h: No such file or directory The problem was that in CMakeLists.txt some targets depend on the pre-generation of T_IDs.h but this dependancy relation was not set, so those targets could be generated before the T (it was the case with HASHTABLE). This commit fixes that. Basically, we take all the targets found in "add_executable" and "add_library" and make them depend on the T if the T is enabled. Almost all existing targets were added, even those that may not need it. The problem of this approach is that someone adding a new target using the T will not necessarily add a dependancy there. Another solution would be to generate T_IDs.h at "cmake" stage, not "make" stage and use an "if (NOT EXISTS T_IDs.h)" to generate the file. We lose the dependancy relation though. Things may be changed if maintenance cost is too high.
This commit is contained in:
@@ -2059,22 +2059,22 @@ endforeach(myExe)
|
||||
|
||||
#ensure that the T header files are generated before targets depending on them
|
||||
if (${T_TRACER})
|
||||
add_dependencies(lte-softmodem generate_T)
|
||||
add_dependencies(lte-softmodem-nos1 generate_T)
|
||||
add_dependencies(rrh_gw generate_T)
|
||||
add_dependencies(oaisim generate_T)
|
||||
add_dependencies(oaisim_nos1 generate_T)
|
||||
add_dependencies(dlsim generate_T)
|
||||
add_dependencies(dlsim_tm4 generate_T)
|
||||
add_dependencies(dlsim_tm7 generate_T)
|
||||
add_dependencies(ulsim generate_T)
|
||||
add_dependencies(pbchsim generate_T)
|
||||
add_dependencies(scansim generate_T)
|
||||
add_dependencies(mbmssim generate_T)
|
||||
add_dependencies(pdcchsim generate_T)
|
||||
add_dependencies(pucchsim generate_T)
|
||||
add_dependencies(prachsim generate_T)
|
||||
add_dependencies(syncsim generate_T)
|
||||
foreach(i
|
||||
#all "add_executable" definitions (except tests, rb_tool, updatefw)
|
||||
lte-softmodem lte-softmodem-nos1 rrh_gw oaisim oaisim_nos1
|
||||
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
|
||||
pdcchsim pucchsim prachsim syncsim
|
||||
#all "add_library" definitions
|
||||
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB
|
||||
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
|
||||
oai_eth_transpro
|
||||
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
|
||||
SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL MIH CN_UTILS
|
||||
GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU SIMU_ETH OPENAIR0_LIB)
|
||||
if (TARGET ${i})
|
||||
add_dependencies(${i} generate_T)
|
||||
endif()
|
||||
endforeach(i)
|
||||
endif (${T_TRACER})
|
||||
|
||||
##################################################
|
||||
|
||||
Reference in New Issue
Block a user