Commit fc6dec9e authored by Cedric Roux's avatar Cedric Roux

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.
parent bd3394f5
...@@ -2059,22 +2059,22 @@ endforeach(myExe) ...@@ -2059,22 +2059,22 @@ endforeach(myExe)
#ensure that the T header files are generated before targets depending on them #ensure that the T header files are generated before targets depending on them
if (${T_TRACER}) if (${T_TRACER})
add_dependencies(lte-softmodem generate_T) foreach(i
add_dependencies(lte-softmodem-nos1 generate_T) #all "add_executable" definitions (except tests, rb_tool, updatefw)
add_dependencies(rrh_gw generate_T) lte-softmodem lte-softmodem-nos1 rrh_gw oaisim oaisim_nos1
add_dependencies(oaisim generate_T) dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
add_dependencies(oaisim_nos1 generate_T) pdcchsim pucchsim prachsim syncsim
add_dependencies(dlsim generate_T) #all "add_library" definitions
add_dependencies(dlsim_tm4 generate_T) ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB
add_dependencies(dlsim_tm7 generate_T) oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
add_dependencies(ulsim generate_T) oai_eth_transpro
add_dependencies(pbchsim generate_T) FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
add_dependencies(scansim generate_T) SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL MIH CN_UTILS
add_dependencies(mbmssim generate_T) GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU SIMU_ETH OPENAIR0_LIB)
add_dependencies(pdcchsim generate_T) if (TARGET ${i})
add_dependencies(pucchsim generate_T) add_dependencies(${i} generate_T)
add_dependencies(prachsim generate_T) endif()
add_dependencies(syncsim generate_T) endforeach(i)
endif (${T_TRACER}) endif (${T_TRACER})
################################################## ##################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment