Make inclusion of doc sub-directory optional by adjusting options.

Allows exclusion of doc and related targets to help when using eigen via add_subdirectory().

Requested by:

https://gitlab.com/libeigen/eigen/-/issues/1842

Also required making EIGEN_TEST_BUILD_DOCUMENTATION a dependent option on EIGEN_BUILD_DOC. This ensures documentation targets are properly defined when EIGEN_TEST_BUILD_DOCUMENTATION is ON.
This commit is contained in:
Bowie Owens
2020-11-18 10:08:23 +11:00
committed by Owens
parent aa56e1d980
commit 9842366bba
3 changed files with 10 additions and 3 deletions

View File

@@ -450,7 +450,7 @@ if (EIGEN_TEST_HIP)
endif()
endif()
option(EIGEN_TEST_BUILD_DOCUMENTATION "Test building the doxygen documentation" OFF)
cmake_dependent_option(EIGEN_TEST_BUILD_DOCUMENTATION "Test building the doxygen documentation" OFF "EIGEN_BUILD_DOC" OFF)
if(EIGEN_TEST_BUILD_DOCUMENTATION)
add_dependencies(buildtests doc)
endif()