From e0d085763dd3d97d3e392ba24ad1a0a09c061c79 Mon Sep 17 00:00:00 2001
From: Ben Couturier <ben.couturier@cern.ch>
Date: Thu, 19 Apr 2018 14:31:48 +0200
Subject: [PATCH] Added option to avoid building documentation

---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2be0b1113..977ae725d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,10 +28,13 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
 ###############################################
 
 OPTION(BUILD_DOCS_ONLY "Build documentation only" OFF)
+OPTION(BUILD_DOCS "Build documentation" ON)
 
 # Add targets for Doxygen code reference and LaTeX User manual
 
-ADD_SUBDIRECTORY(doc)
+if (BUILD_DOCS)
+    ADD_SUBDIRECTORY(doc)
+ENDIF()
 
 # If only building docs, stop processing the rest of the CMake file:
 IF(BUILD_DOCS_ONLY)
-- 
GitLab