aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt35
-rw-r--r--README.md6
-rw-r--r--docs/Doxyfile.in (renamed from docs/Doxyfile)10
-rwxr-xr-xscripts/update_docs5
-rw-r--r--yage/yage.h5
6 files changed, 44 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 991dcdfa..02a05faf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ Testing
# specific directory to ignore
/html
+/docs/Doxyfile
# extensions to ignore
*.o
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d480b31c..f2ec7120 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,9 @@ project(yage
VERSION 0.1.3.0
LANGUAGES CXX)
+option(YAGE_BUILD_TESTS "Build tests and ctest testing suite" ON)
+option(YAGE_BUILD_DOCS "Build documentation using Doxygen" ON)
+
# set standard
set(CMAKE_CXX_STANDARD 14)
@@ -52,6 +55,34 @@ target_link_libraries(yage
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples)
-if(YAGE_BUILD_TESTS)
+if(${YAGE_BUILD_TESTS})
+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
-endif(YAGE_BUILD_TESTS)
+
+endif(${YAGE_BUILD_TESTS})
+
+if(${YAGE_BUILD_DOCS})
+
+ find_package(Doxygen)
+
+ if(DOXYGEN_FOUND)
+
+ set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in)
+ set(DOXYGEN_OUT ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile)
+
+ configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
+ message("-- Configured Doxygen files")
+
+ add_custom_target(doc_doxygen ALL
+ COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} >/dev/null
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMENT "Generating API documentation with Doxygen")
+
+ else(DOXYGEN_FOUND)
+
+ message("Doxygen needs to be installed to generate the documentation.")
+
+ endif(DOXYGEN_FOUND)
+
+endif(${YAGE_BUILD_DOCS})
+
diff --git a/README.md b/README.md
index 882f37dd..8498be38 100644
--- a/README.md
+++ b/README.md
@@ -36,13 +36,13 @@ For example, one can use the following commands
``` shell
mkdir -p build
cd build
-cmake -DENABLE_TESTING=1 ..
+cmake ..
```
-You can then run google test on YAGE.
+The test suite can then be run using
``` shell
-ctest
+cd build/tests && ctest
```
License
diff --git a/docs/Doxyfile b/docs/Doxyfile.in
index 10422fba..ebb324e2 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile.in
@@ -38,7 +38,7 @@ PROJECT_NAME = "YAGE"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = v0.1.3
+PROJECT_NUMBER = v@yage_VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY =
+OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc_doxygen/
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = docs \
- yage \
- README.md
+INPUT = @CMAKE_CURRENT_SOURCE_DIR@/docs \
+ @CMAKE_CURRENT_SOURCE_DIR@/yage \
+ @CMAKE_CURRENT_SOURCE_DIR@/README.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/scripts/update_docs b/scripts/update_docs
index cf117f73..be1eaf1d 100755
--- a/scripts/update_docs
+++ b/scripts/update_docs
@@ -1,14 +1,13 @@
#!/usr/bin/env bash
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
- doxygen ./docs/Doxyfile
- if [ -d "$TRAVIS_BUILD_DIR/html" ]; then
+ if [ -d "$TRAVIS_BUILD_DIR/build/doc_doxygen/html" ]; then
git clone -b gh-pages "https://$GH_TOKEN@github.com/ymherklotz/YAGE.git" YAGE_gh-pages
cd YAGE_gh-pages
git config user.name "TravisBot"
git config user.email ""
rm -rf *
- cp -r ../html/* .
+ cp -r ../build/doc_doxygen/html/* .
git add -A .
git commit -m "Rebuilding documentation"
git push -q origin gh-pages
diff --git a/yage/yage.h b/yage/yage.h
index 3dd27eb8..3e8ac47b 100644
--- a/yage/yage.h
+++ b/yage/yage.h
@@ -6,11 +6,6 @@
* ----------------------------------------------------------------------------
*/
-/** @file Includes all the headers in the main yage project.
- *
- * This does not include
- */
-
#ifndef YAGE_YAGE_H
#define YAGE_YAGE_H