Skip to content

Commit 7f7cd72

Browse files
authored
Merge pull request #720 from sandy-lcq/master
CMakeLists.txt: make DLT_WatchdogSec can be set by user
2 parents 91deea1 + bc03f14 commit 7f7cd72

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

systemd/CMakeLists.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ if(WITH_SYSTEMD)
1818
set(SYSTEMD_CONFIGURATIONS_FILES_DIR ${SYSTEMD_UNITDIR} )
1919

2020
if(WITH_SYSTEMD_WATCHDOG)
21-
set( DLT_WatchdogSec 2 )
21+
if(NOT DEFINED DLT_WatchdogSec)
22+
set(DLT_WatchdogSec 2 CACHE STRING "Watchdog timeout in seconds")
23+
endif()
2224
message( STATUS "The systemd watchdog is enabled - timeout is set to ${DLT_WatchdogSec} seconds")
2325
else(WITH_SYSTEMD_WATCHDOG)
24-
set( DLT_WatchdogSec 0 )
26+
if(NOT DEFINED DLT_WatchdogSec)
27+
set(DLT_WatchdogSec 0 CACHE STRING "Watchdog timeout in seconds")
28+
endif()
2529
message( STATUS "The systemd watchdog is disabled")
2630
endif(WITH_SYSTEMD_WATCHDOG)
2731

0 commit comments

Comments
 (0)