Configure the term timeout using the cmake definition

EXTRA_TERM_TIMEOUT_S
master
Alejandro Leal Conejos 3 years ago committed by AlaiaL
parent d9bdc3f83e
commit 9daa32e591

@ -537,6 +537,11 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --param large-function-growth=1600") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --param large-function-growth=1600")
endif(CMAKE_C_COMPILER_ID MATCHES "GNU") endif(CMAKE_C_COMPILER_ID MATCHES "GNU")
if (EXTRA_TERM_TIMEOUT_S)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSRSRAN_TERM_TIMEOUT_S=${EXTRA_TERM_TIMEOUT_S}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSRSRAN_TERM_TIMEOUT_S=${EXTRA_TERM_TIMEOUT_S}")
endif (EXTRA_TERM_TIMEOUT_S)
message(STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}") message(STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}")
message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}") message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")

@ -17,7 +17,9 @@
#include <cstdio> #include <cstdio>
#include <unistd.h> #include <unistd.h>
#ifndef SRSRAN_TERM_TIMEOUT_S
#define SRSRAN_TERM_TIMEOUT_S (5) #define SRSRAN_TERM_TIMEOUT_S (5)
#endif
/// Handler called after the user interrupts the program. /// Handler called after the user interrupts the program.
static std::atomic<srsran_signal_hanlder> user_handler; static std::atomic<srsran_signal_hanlder> user_handler;

Loading…
Cancel
Save