From 576e9ff6daf27983651cb7b5105cae6da9e091ff Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Mon, 27 Sep 2021 14:27:27 +0200
Subject: [PATCH] WIP: Extended documentation.

---
 .gitlab-ci.yml     |  8 ++------
 Makefile           |  6 ++++++
 doc/CMakeLists.txt | 10 +++++-----
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 334ff10..1e09de3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -143,12 +143,8 @@ trigger_inttest:
   tags: [ cached-dind ]
   stage: deploy
   script:
-    - mkdir -p build
-    - cd build
-    - conan install .. -s "compiler.libcxx=libstdc++11"
-    - cmake ..
-    - cmake --build . --target doc-sphinx
-    - cp -r doc/sphinx_out ../public
+    - make doc
+    - cp -r build/doc/sphinx_out ../public
 
 test_pages:
   <<: *pages_prepare
diff --git a/Makefile b/Makefile
index 819b9ca..4772702 100644
--- a/Makefile
+++ b/Makefile
@@ -64,3 +64,9 @@ conan-create:
 
 conan: conan-install conan-create
 .PHONY: conan
+
+doc:
+	mkdir -p build && cd build && conan install .. -s $(CONAN_SETTINGS) \
+	  && cmake .. && cmake --build . --target doc-sphinx \
+	  && echo "The documentation starts at build/doc/sphinx_out/index.html ."
+.PHONY: doc
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 4255ab7..c78f2b3 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -18,6 +18,7 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 #
 
+cmake_minimum_required(VERSION 3.13)
 find_package(Doxygen)
 
 if (DOXYGEN_FOUND)
@@ -89,12 +90,11 @@ if (DOXYGEN_FOUND)
             VERBATIM
             )
         # Copying files is necessary: https://stackoverflow.com/a/45808534/232888
-		# TODO fix for docs
-		#FILE(COPY
-		#Examples.rst
-		#README_SETUP.md
+		FILE(COPY
+		    Examples.rst
+		    README_SETUP.md
             # Tutorial.rst
-			#DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+			DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
     else ()
         message("Sphinx need to be installed to generate the sphinx documentation")
     endif ()
-- 
GitLab