* automatic generation of protobuf messages in CMakeList.txt

This commit is contained in:
Navid Nikaein
2015-12-16 16:53:37 +01:00
parent bd1de293c6
commit 988b483ab0
3 changed files with 13 additions and 9 deletions
+4 -4
View File
@@ -712,8 +712,8 @@ if (ENB_AGENT)
)
set(PRPT_C_DIR ${protobuf_generated_dir}/${PRPTDIR})
message("calling ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES}")
execute_process(COMMAND ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES})
#message("calling protoc_call=${protoc_call} PRPT_C_DIR=${PRPT_C_DIR} PRPT_MSG_FILES=${PRPT_MSG_FILES}")
execute_process(COMMAND ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_DIR} ${PRPT_MSG_FILES})
file(GLOB PRPT_source ${PRPT_C_DIR}/*.c)
set(PRPT_OAI_generated
${PRPT_C_DIR}/header.pb-c.c
@@ -729,7 +729,7 @@ if (ENB_AGENT)
${PRPT_OAI_generated}
${PRPT_source}
)
set(PRPT_MSG_LIB PRPT_MSG)
include_directories ("${PRPT_C_DIR}")
add_library(ASYNC_IF
@@ -1647,7 +1647,7 @@ add_executable(oaisim_nos1
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim_nos1
-Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${ASYNC_IF_LIB}
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${PRPT_MSG_LIB} ${ASYNC_IF_LIB}
-Wl,--end-group )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
+8 -4
View File
@@ -3,12 +3,16 @@
function main()
{
mkdir -p $1
cd $1
echo generate protobuf messages inside $1 $2
#echo generate protobuf messages inside $1 $2
protoc-c --c_out=$1 $2
protoc --cpp_out=$1 $2
c_out=$1
shift
proto_path=$1
shift
protoc-c --c_out=$c_out --proto_path=$proto_path $*
#protoc --cpp_out=$c_out --proto_path=$proto_path $*
}
+1 -1
View File
@@ -1,7 +1,7 @@
package protocol;
import "stats_messages.proto";
import "header.proto"
import "header.proto";
message progran_message {
oneof msg {