From 9842366bba5eddaf847a265a1710b694211e6258 Mon Sep 17 00:00:00 2001 From: Bowie Owens Date: Wed, 18 Nov 2020 10:08:23 +1100 Subject: 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. --- unsupported/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'unsupported') 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 -- cgit v1.2.3