Skip to content

Commit 1093c0f

Browse files
committed
disallow invalid values for WITH_SYSTEMD cmake variable.
1 parent e95d65d commit 1093c0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/systemd.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ MACRO(CHECK_SYSTEMD)
7676
UNSET(HAVE_SYSTEMD_SD_NOTIFYF)
7777
MESSAGE(STATUS "Systemd features not enabled")
7878
IF(WITH_SYSTEMD STREQUAL "yes")
79-
MESSAGE(FATAL_ERROR "Requested WITH_SYSTEMD=YES however no dependencies installed/found")
79+
MESSAGE(FATAL_ERROR "Requested WITH_SYSTEMD=yes however no dependencies installed/found")
8080
ENDIF()
8181
ENDIF()
82+
ELSEIF(NOT WITH_SYSTEMD STREQUAL "no")
83+
MESSAGE(FATAL_ERROR "Invalid value for WITH_SYSTEMD. Must be 'yes', 'no', or 'auto'.")
8284
ENDIF()
8385
ENDIF()
8486
ENDMACRO()

0 commit comments

Comments
 (0)