diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt index 16cbe86b5..659378d16 100644 --- a/systemd/CMakeLists.txt +++ b/systemd/CMakeLists.txt @@ -18,10 +18,14 @@ if(WITH_SYSTEMD) set(SYSTEMD_CONFIGURATIONS_FILES_DIR ${SYSTEMD_UNITDIR} ) if(WITH_SYSTEMD_WATCHDOG) - set( DLT_WatchdogSec 2 ) + if(NOT DEFINED DLT_WatchdogSec) + set(DLT_WatchdogSec 2 CACHE STRING "Watchdog timeout in seconds") + endif() message( STATUS "The systemd watchdog is enabled - timeout is set to ${DLT_WatchdogSec} seconds") else(WITH_SYSTEMD_WATCHDOG) - set( DLT_WatchdogSec 0 ) + if(NOT DEFINED DLT_WatchdogSec) + set(DLT_WatchdogSec 0 CACHE STRING "Watchdog timeout in seconds") + endif() message( STATUS "The systemd watchdog is disabled") endif(WITH_SYSTEMD_WATCHDOG)