Automatic documentation generation

This commit is contained in:
johltn
2020-10-24 14:48:03 +02:00
parent a70429d2c8
commit 25a5b435a6
6 changed files with 171 additions and 4 deletions
+1
View File
@@ -12,3 +12,4 @@ __pycache__
.vscode
# PyCharm files
.idea
/docs/output
+11 -3
View File
@@ -24,9 +24,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # not necessary, but encouraged
project (IfcOpenShell)
#set(Boost_DEBUG 1)
foreach(max_year RANGE 2014 2030)
set(max_sdk "$ENV{ADSK_3DSMAX_SDK_${max_year}}")
if (NOT "${max_sdk}" STREQUAL "")
@@ -406,6 +403,10 @@ if(ENABLE_BUILD_OPTIMIZATIONS)
endif()
endif()
IF(MSVC)
# Enable solution folders (free VS versions prior to 2012 don't support solution folders)
if (MSVC_VERSION GREATER 1600)
@@ -658,6 +659,13 @@ INSTALL(TARGETS IfcGeomServer
endif()
# Documentation
set(CMAKE_MODULE_PATH "../docs/cmake")
ADD_SUBDIRECTORY(../docs docs)
IF(BUILD_IFCPYTHON)
ADD_SUBDIRECTORY(../src/ifcwrap ifcwrap)
ENDIF()
+61
View File
@@ -0,0 +1,61 @@
find_package(Doxygen REQUIRED)
find_package(Sphinx REQUIRED)
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR})
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/docs/sphinx)
MESSAGE(STATUS "SPHINX BUILD ${CMAKE_CURRENT_BINARY_DIR}")
file(MAKE_DIRECTORY ./output/doxygen)
set(OUTPUT_FOLDER ./output)
if (DOXYGEN_FOUND)
MESSAGE(STATUS "${PROJECT_SOURCE_DIR}")
MESSAGE(STATUS "${DOXYGEN_OUTPUT_DIR}/html/index.html")
# # Find all the public headers
# #get_target_property(IFC_GEOM_PUBLIC_HEADER_DIR IfcGeom INTERFACE_INCLUDE_DIRECTORIES)
# file(GLOB_RECURSE CAT_CUTIFIER_PUBLIC_HEADERS ${CAT_CUTIFIER_PUBLIC_HEADER_DIR}/*.h)
# file(GLOB SERIALIZERS_H_FILES C://Users//jlutt//Documents//IfcOpenShell//src//testdoc/*.h)
# set(DOXYGEN_INPUT_DIR C://Users//jlutt//Documents//IfcOpenShell//src//testdoc)
# file(GLOB SERIALIZERS_H_FILES C://Users//jlutt//Documents//IfcOpenShell//src//serializers/*.h)
# set(DOXYGEN_OUTPUT_DIR C://Users//jlutt//Documents//IfcOpenShell//docs/doxygen)
# set(DOXYGEN_INDEX_FILE C://Users//jlutt//Documents//IfcOpenShell//docs/doxygen/html/index.html)
# set(DOXYFILE_IN C://Users//jlutt//Documents//IfcOpenShell//docs//Doxyfile.in)
# set(DOXYFILE_OUT C://Users//jlutt//Documents//IfcOpenShell//docs//Doxyfile.out)
# #Replace variables inside @@ with the current values
# configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
add_custom_target(Sphinx ALL
COMMAND
${SPHINX_EXECUTABLE} -b html
${SPHINX_SOURCE} C://Users//jlutt//Documents//IfcOpenShell//docs//output//sphinx
WORKING_DIRECTORY C://Users//jlutt//Documents//IfcOpenShell//docs//output
#WORKING_DIRECTORY ${OUTPUT_FOLDER}
COMMENT "Generating documentation with Sphinx")
add_custom_target(pyrealsense2_docs ALL
COMMAND make html
WORKING_DIRECTORY C://Users//jlutt//Documents//IfcOpenShell//src//ifcblenderexport//docs
OUTPUT C://Users//jlutt//Documents//IfcOpenShell//src//ifcblenderexport//docs
COMMENT "Generating documentation with Sphinx")
else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
+58
View File
@@ -0,0 +1,58 @@
# The `extensions` list should already be in here from `sphinx-quickstart`
extensions = [
# there may be others here already, e.g. 'sphinx.ext.mathjax'
'breathe',
'exhale',
'sphinx.ext.intersphinx'
]
project = u'IfcOpenShell'
copyright = u'2020, IfcOpenShell'
author = u'Johan Luttun'
# Setup the breathe extension
# breathe_projects = {
# "My Project": "./doxygen/xml"
# }
breathe_projects = {
"My Project": "./output/doxygen/xml"
}
breathe_default_project = "My Project"
# Setup the exhale extension
exhale_args = {
# These arguments are required
"containmentFolder": "./rst_files",
"rootFileName": "library_root.rst",
"rootFileTitle": "IfcOpenShell",
"doxygenStripFromPath": "..",
# Suggested optional arguments
"createTreeView": True,
# TIP: if using the sphinx-bootstrap-theme, you need
# "treeViewIsBootstrap": True,
"exhaleExecutesDoxygen": True,
"exhaleDoxygenStdin": "INPUT = ../src/testdoc ../src/ifcconvert"
}
# html_theme = 'sphinx_rtd_theme'
# html_theme = 'classic'
# Tell sphinx what the primary language being documented is.
primary_domain = 'cpp'
# Tell sphinx what the pygments highlight language should be.
highlight_language = 'cpp'
# html_sidebars = {
# '**': ['globaltoc.html', 'sourcelink.html', 'searchbox.html'],
# 'using/windows': ['windowssidebar.html', 'searchbox.html'],
# }
# html_sidebars = {'**': ['logo-text.html', 'globaltoc.html', 'searchbox.html']}
# html_theme_options = {
# 'navigation_depth': 4,
# }
+39
View File
@@ -0,0 +1,39 @@
.. ifcgeom documentation master file, created by
sphinx-quickstart on Tue Sep 15 09:59:35 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to IfcOpenShell's documentation!
========================================
.. |logo| image:: stars.jpg
:width: 20pt
:height: 20pt
.. toctree::
:maxdepth: 3
:caption: User Documentation
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`
Documentation
====
====
====
.. toctree::
:maxdepth: 5
about
rst_files/library_root
+1 -1
View File
@@ -63,7 +63,7 @@ set BOOST_VERSION=1.67.0
set BOOST_VER=%BOOST_VERSION:.=_%
echo "TEEEEEEEEEEEST"
echo %OCC_INCLUDE_DIR%
set BOOST_ROOT=%DEPS_DIR%\boost_%BOOST_VER%