From 6c4fa4055d1acea5f28c9e1c3ace810b7ac8266e Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Thu, 18 Mar 2021 21:29:00 +0100 Subject: CMake: Explain difference between default_option and cmake_dependent_option --- cmake/modules/DefaultOption.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake') diff --git a/cmake/modules/DefaultOption.cmake b/cmake/modules/DefaultOption.cmake index b8cc640d05..c9c0b6d134 100644 --- a/cmake/modules/DefaultOption.cmake +++ b/cmake/modules/DefaultOption.cmake @@ -24,6 +24,10 @@ Example invocation: If ``USE_BAR`` is true and ``USE_ZOT`` is false, the option called ``USE_FOO`` will default to ``ON``, otherwise it will default to ``OFF``. + +In contrast to ``cmake_dependent_option`` which disables the option completely +if the ```` condition evaluates to false, ``default_option`` will only +set a default and the value may be overridden by the user. #]=======================================================================] macro(DEFAULT_OPTION option doc depends) -- cgit v1.2.3