diff options
author | Bowie Owens <bowie.owens@csiro.au> | 2020-11-18 10:08:23 +1100 |
---|---|---|
committer | Owens <owe043@csiro.au> | 2020-11-27 08:11:49 +1100 |
commit | 9842366bba5eddaf847a265a1710b694211e6258 (patch) | |
tree | 4d8988a1e3707396376d78dcf47fa1cb2345d5e4 /CMakeLists.txt | |
parent | aa56e1d98058872600457816fd5036130d57e140 (diff) |
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1340b04f3..86bf5f64c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -470,7 +470,12 @@ endif() install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) -add_subdirectory(doc EXCLUDE_FROM_ALL) + +option(EIGEN_BUILD_DOC "Enable creation of Eigen documentation" ON) +if(EIGEN_BUILD_DOC) + add_subdirectory(doc EXCLUDE_FROM_ALL) +endif() + option(BUILD_TESTING "Enable creation of Eigen tests." ON) if(BUILD_TESTING) |