aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--unsupported/CMakeLists.txt4
3 files changed, 10 insertions, 3 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)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 59440cfe8..8eda8d2f1 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -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()
diff --git a/unsupported/CMakeLists.txt b/unsupported/CMakeLists.txt
index 9a5666105..34408c017 100644
--- a/unsupported/CMakeLists.txt
+++ b/unsupported/CMakeLists.txt
@@ -1,5 +1,7 @@
add_subdirectory(Eigen)
-add_subdirectory(doc EXCLUDE_FROM_ALL)
+if(EIGEN_BUILD_DOC)
+ add_subdirectory(doc EXCLUDE_FROM_ALL)
+endif()
if(BUILD_TESTING)
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest