Skip to content

Commit

Permalink
added doxygen call to generate documentation for cpp runtime in main …
Browse files Browse the repository at this point in the history
…CMakefile

 it can be generated  with  BUILD_DOCUMENTATION=true.
 the documentation is build in SimulationRuntime\cpp\Build\Doc
  • Loading branch information
niklwors committed May 21, 2015
1 parent ed947ef commit c1dcb65
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 80 deletions.
43 changes: 24 additions & 19 deletions SimulationRuntime/cpp/CMakeLists.txt
Expand Up @@ -39,7 +39,7 @@ OPTION(USE_SCOREP "USE_SCOREP" OFF)
OPTION(BOOST_STATIC_LINKING "BOOST_STATIC_LINKING" OFF)
OPTION(RUNTIME_PROFILING "RUNTIME_PROFILING" OFF)
OPTION(SUNDIALS_ROOT "SUNDIALS ROOT" "")

OPTION(BUILD_DOCUMENTATION "Use Doxygen to create the cpp runtime documentation" OFF)

#Set Variables
SET(MODELICAEXTERNALCDIR "${CMAKE_SOURCE_DIR}/../../3rdParty/ModelicaExternalC/C-Sources")
Expand Down Expand Up @@ -180,24 +180,7 @@ IF(WIN32)

SET(INSTALL_OMDEV_LIBS ON)
ENDIF(WIN32)
#Find Doxygen
option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)
if(BUILD_DOCUMENTATION)
FIND_PACKAGE(Doxygen)
if (NOT DOXYGEN_FOUND)
message(FATAL_ERROR
"Doxygen is needed to build the documentation. Please install it correctly")
endif()
#-- Configure the Template Doxyfile for our specific project
configure_file(Doxyfile.in
${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
#-- Add a custom target to run Doxygen when ever the project is built
add_custom_target (Docs ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
# IF you do NOT want the documentation to be generated EVERY time you build the project
# then leave out the 'ALL' keyword from the above command.
endif()


# Find CMinpack
# Note: Visual Studio libs are located in install/msvc, libs for gcc are directly in install
Expand Down Expand Up @@ -372,6 +355,28 @@ IF(USE_SUNDIALS)
ENDIF(WIN32)
ENDIF(USE_SUNDIALS)

#-- generate documentation of cpp runtime with doxygen
if(BUILD_DOCUMENTATION)
FIND_PACKAGE(Doxygen)
if (NOT DOXYGEN_FOUND)
message(FATAL_ERROR
"Doxygen is needed to build the documentation. Please install it correctly")
endif()
MESSAGE(STATUS "Build the documentation with Doxygen")
#-- Configure the Template Doxyfile for our specific project
configure_file(cppruntimedoc.config.in
${PROJECT_BINARY_DIR}/cppruntimedoc.config @ONLY IMMEDIATE)
#-- Add a custom target to run Doxygen when ever the project is built
add_custom_target (Docs ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/cppruntimedoc.config
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
# IF you do NOT want the documentation to be generated EVERY time you build the project
# then leave out the 'ALL' keyword from the above command.
endif()



#Handle umfpack
FIND_PACKAGE(SuiteSparse)
Expand Down
@@ -1,13 +1,11 @@
#pragma once
/** @defgroup simcorefactoryBodas SimCoreFactroy.BodasFactory
/** @defgroup simcorefactoryBodas SimCoreFactory.BodasFactory
* Object factories for the Bodas target
* @{
*/
#include <Core/ModelicaDefine.h>
#include <Core/Modelica.h>

//#include <memory>

class ISimController;
class ISettingsFactory;

Expand Down
4 changes: 4 additions & 0 deletions SimulationRuntime/cpp/Makefile.omdev.mingw
Expand Up @@ -20,6 +20,10 @@ ifeq ("$(RUNTIME_STATIC_LINKING)","true")
cd ./Build; echo "change to Build"; \
$(CMAKE) -G "MSYS Makefiles" -D CMAKE_BUILD_TYPE=RelWithDebInfo -DRUNTIME_STATIC_LINKING=ON -D CMAKE_INSTALL_PREFIX:PATH="$(OMBUILDDIR)" MAKE_CXX_COMPILER=g++ ../; \
make;
else ifeq ("$(BUILD_DOCUMENTATION)","true")
cd ./Build; echo "change to Build"; \
$(CMAKE) -G "MSYS Makefiles" -D CMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_DOCUMENTATION=ON -D CMAKE_INSTALL_PREFIX:PATH="$(OMBUILDDIR)" MAKE_CXX_COMPILER=g++ ../; \
make;
else
cd ./Build; echo "change to Build"; \
$(CMAKE) -G "MSYS Makefiles" -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH="$(OMBUILDDIR)" MAKE_CXX_COMPILER=g++ ../; \
Expand Down
Expand Up @@ -758,64 +758,64 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = Include/Core/ \
Include/Core/DataExchange \
Include/Core/DataExchange/Policies \
Include/Core/Extensions \
Include/Core/Math \
Include/Core/Modelica \
Include/Core/Object \
Include/Core/SimController \
Include/Core/SimulationSettings \
Include/Core/Solver \
Include/Core/System \
Include/Core/Utils/Modelica \
Core/DataExchange \
Core/Math \
Core/Modelica \
Core/SimController \
Core/SimulationSettings \
Core/Solver/ \
Core/System/ \
Core/Utils/Modelica \
Include/Solver/CVode \
Include/Solver/Euler \
Include/Solver/Hybrj \
Include/Solver/IDA \
Include/Solver/Kinsol \
Include/Solver/Newton \
Include/Solver/Peer \
Include/Solver/RTEuler \
Include/Solver/UmfPack \
Solver/CVode \
Solver/Euler \
Solver/IDA \
Solver/Kinsol \
Solver/Newton \
Solver/Peer \
Solver/RTEuler \
Solver/UmfPack \
Include/FMU2 \
Include/SimCoreFactory/ \
Include/SimCoreFactory/BodasFactory \
Include/SimCoreFactory/OMCFactory \
Include/SimCoreFactory/VxWorksFactory \
Include/Policies \
SimCoreFactory/BodasFactory \
SimCoreFactory/OMCFactory \
SimCoreFactory/VxWorksFactory \
Include/Solver/CVode \
Include/Solver/Euler \
Include/Solver/Hybrj \
Include/Solver/Kinsol \
Include/Solver/Newton \
Include/Solver/RTEuler \
Solver/CVode \
Solver/Euler \
Solver/Hybrj \
Solver/Kinsol \
Solver/Newton \
Solver/RTEuler \
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/Include/Core/ \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/DataExchange \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/DataExchange/Policies \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/Extensions \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/Math \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/Modelica \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/Object \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/SimController \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/SimulationSettings \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/Solver \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/System \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Core/Utils/Modelica \
@CMAKE_CURRENT_SOURCE_DIR@/Core/DataExchange \
@CMAKE_CURRENT_SOURCE_DIR@/Core/Math \
@CMAKE_CURRENT_SOURCE_DIR@/Core/Modelica \
@CMAKE_CURRENT_SOURCE_DIR@/Core/SimController \
@CMAKE_CURRENT_SOURCE_DIR@/Core/SimulationSettings \
@CMAKE_CURRENT_SOURCE_DIR@/Core/Solver/ \
@CMAKE_CURRENT_SOURCE_DIR@/Core/System/ \
@CMAKE_CURRENT_SOURCE_DIR@/Core/Utils/Modelica \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/CVode \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Euler \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Hybrj \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/IDA \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Kinsol \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Newton \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Peer \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/RTEuler \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/UmfPack \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/CVode \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Euler \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/IDA \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Kinsol \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Newton \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Peer \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/RTEuler \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/UmfPack \
@CMAKE_CURRENT_SOURCE_DIR@/Include/FMU2 \
@CMAKE_CURRENT_SOURCE_DIR@/Include/SimCoreFactory/ \
@CMAKE_CURRENT_SOURCE_DIR@/Include/SimCoreFactory/BodasFactory \
@CMAKE_CURRENT_SOURCE_DIR@/Include/SimCoreFactory/OMCFactory \
@CMAKE_CURRENT_SOURCE_DIR@/Include/SimCoreFactory/VxWorksFactory \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Policies \
@CMAKE_CURRENT_SOURCE_DIR@/SimCoreFactory/BodasFactory \
@CMAKE_CURRENT_SOURCE_DIR@/SimCoreFactory/OMCFactory \
@CMAKE_CURRENT_SOURCE_DIR@/SimCoreFactory/VxWorksFactory \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/CVode \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Euler \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Hybrj \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Kinsol \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/Newton \
@CMAKE_CURRENT_SOURCE_DIR@/Include/Solver/RTEuler \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/CVode \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Euler \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Hybrj \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Kinsol \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/Newton \
@CMAKE_CURRENT_SOURCE_DIR@/Solver/RTEuler \



Expand Down

0 comments on commit c1dcb65

Please sign in to comment.