Skip to content

Commit d72b445

Browse files
authored
Merge pull request #6248 from gdevenyi/cmake-doc-4.14
BUG: Fix check for including old cmake documentation code
2 parents b31208a + 39ecf6e commit d72b445

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

Utilities/Doxygen/CMakeLists.txt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
#
22
# Build the documentation
33
#
4-
# CMake's Documentation.cmake was deprecated in CMake 3.18 via CMP0106 and
5-
# removed entirely in CMake 4.0. Use the bundled module on older CMake
6-
# (preserving any auxiliary behavior it provides on era-original toolchains)
7-
# and inline the BUILD_DOCUMENTATION option on CMake >= 4.0 where the file
8-
# no longer ships.
9-
if(CMAKE_VERSION VERSION_LESS 4.0)
10-
include(${CMAKE_ROOT}/Modules/Documentation.cmake)
11-
else()
12-
option(BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF)
13-
endif()
4+
# CMake's Documentation.cmake (the source of BUILD_DOCUMENTATION on legacy
5+
# toolchains) is deprecated under CMP0106 since CMake 3.18 and removed in
6+
# CMake 4.0. Define the option directly; no auxiliary variable from that
7+
# module is referenced in this tree.
8+
option(BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF)
149

1510
mark_as_advanced(BUILD_DOCUMENTATION)
1611

0 commit comments

Comments
 (0)