From aaf5cb060fe78509157578a949968ee7133c15eb Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 29 Sep 2023 10:54:16 -0700 Subject: [PATCH] cmake: only require sphinx for explicit docs Ensure we only add REQUIRED to the check for sphinx when the ENABLE_DOCS option is "On" rather than "Try". --- doc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 2ca532501..5e0d99b55 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,7 +1,7 @@ set(3VALUE_OPTS On Off Try) set(ENABLE_DOCS "Try" CACHE STRING "Enables documentation") -if(ENABLE_DOCS) # only matches On +if(ENABLE_DOCS AND NOT ENABLE_DOCS STREQUAL "Try") # only matches On set(REQ_DOCS REQUIRED) endif() find_program(SPHINX NAMES sphinx-build sphinx-build2 ${REQ_DOCS})