Set up WITH_CHROOT and WITH_USER as user-settable string parameters.

No, I have no idea why CMake has option() to create user-settable
documented Boolean parameters but uses a special variant of set() to
create user-settable documented non-Boolean parameters.
This commit is contained in:
Guy Harris 2018-01-22 18:50:51 -08:00
parent bdafcfbfb0
commit f1f3bfc031

View File

@ -15,6 +15,18 @@ option(WITH_CAPSICUM "Build with Capsicum security functions, if available" ON)
option(WITH_CAP_NG "Use libcap-ng, if available" ON)
option(ENABLE_SMB "Build with the SMB dissector" ON)
#
# String parameters. Neither of them are set, initially; only if the
# user explicitly configures them are they set.
#
# WITH_CHROOT is STRING, not PATH, as the directory need not exist
# when CMake is run.
#
set(WITH_CHROOT CACHE STRING
"Directory to which to chroot when dropping privileges")
set(WITH_USER CACHE STRING
"User to whom to set the UID when dropping privileges")
#
# By default, build universal with the appropriate set of architectures
# for the OS on which we're doing the build.