adding QUIET to find_package() breaks cmake_dependent_option()
Consider the following code:
find_package(LibOFX QUIET)
message("LibOFX_FOUND: ${LibOFX_FOUND}")
cmake_dependent_option(ENABLE_LIBOFX "Enable LibOFX support." ON "LibOFX_FOUND" OFF)
add_feature_info("LibOFX" ENABLE_LIBOFX "Enables OFX import, export, and Direct Connect using LibOFX library.")
Despite LibOFX_FOUND
reported as 1, cmake_dependent_option
hides that option from user if QUIET
is added to find_package()
. Merely removing QUIET
restores the correct behavior of cmake_dependent_option
and the option is presented to user.
Nothing in cmake_dependent_option
nor in find_package
documentation implies that this would be intended behavior. Per the condition, it should only evaluate the LibOFX_FOUND
value. Or am I missing something?
cmake version 3.24.1 macOS 12.5.1 (21G83)