Commit e113cafc authored by Remi Perenon's avatar Remi Perenon
Browse files

Adding documentation within CI

parent 8d37051f
Pipeline #8738 passed with stages
in 20 minutes and 45 seconds
......@@ -9,6 +9,8 @@ ENV http_proxy http://proxy.ill.fr:8888
# So need to install software-properties-common to add kitware repo https://askubuntu.com/questions/493460/how-to-install-add-apt-repository-using-the-terminal
# So need to install apt-transport-https https://unix.stackexchange.com/questions/263801/apt-get-fails-the-method-driver-usr-lib-apt-methods-https-could-not-be-found
RUN apt-get update && apt-get install -y python3 \
doxygen \
graphviz \
libaec-dev \
libz-dev \
libsz2 && \
......
......@@ -11,6 +11,8 @@ ENV LD_LIBRARY_PATH=/opt/intel/lib/intel64
# So need to install software-properties-common to add kitware repo https://askubuntu.com/questions/493460/how-to-install-add-apt-repository-using-the-terminal
# So need to install apt-transport-https https://unix.stackexchange.com/questions/263801/apt-get-fails-the-method-driver-usr-lib-apt-methods-https-could-not-be-found
RUN apt-get update && apt-get install -y python3 \
doxygen \
graphviz \
libaec-dev \
libz-dev \
libsz2 && \
......
......@@ -6,5 +6,7 @@ mkdir build_release
cd build_release
cmake -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_Fortran_COMPILER=ifort -DPYTHON_API=ON -DPYTHON_LIBRARY_PATH=${PYTHON_LIBRARY_PATH} -D USE_HDF=ON -D HDF5_INCLUDE_PATH=${HDF5_INCLUDE_PATH} -D HDF5_LIBRARY_PATH=${HDF5_LIBRARY_PATH} ..
cmake --build . --target install
cmake --build .
cmake --build . --target doxygen
ctest
cmake --build . --target install
\ No newline at end of file
......@@ -6,5 +6,7 @@ mkdir build_release
cd build_release
cmake -G "NMake Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_Fortran_COMPILER=ifort -D HEAP_ARRAYS=ON -D PYTHON_API=ON -D PYTHON_LIBRARY_PATH=%PYTHON_LIBRARY_PATH% -D USE_HDF=ON -D HDF5_INCLUDE_PATH=%HDF5_INCLUDE_PATH% -D HDF5_LIBRARY_PATH=%HDF5_LIBRARY_PATH% ..
cmake --build . --target install
cmake --build .
cmake --build . --target doxygen
ctest
cmake --build . --target install
\ No newline at end of file
#################################
# Commad line arguments section
#################################
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
#################################
# Project section
#################################
# The project is declared. It is a Fortran project.
project(Python_API Fortran)
set(LIBRARY_NAME crysfml_api)
......@@ -54,6 +52,37 @@ include_directories(${CRYSFML_COMMON_MODULE_DIRECTORY})
target_link_libraries(${LIBRARY_NAME} crysfml_common)
target_link_libraries(${LIBRARY_NAME} Python3_LIB)
#################################
# Documentation
#################################
find_package(Doxygen)
if (DOXYGEN_FOUND)
set( DOXYGEN_OUTPUT_DIRECTORY doxygen )
set( DOXYGEN_COLLABORATION_GRAPH YES )
set( DOXYGEN_EXTRACT_ALL YES )
set( DOXYGEN_CLASS_DIAGRAMS YES )
set( DOXYGEN_HIDE_UNDOC_RELATIONS NO )
set( DOXYGEN_HAVE_DOT YES )
set( DOXYGEN_CLASS_GRAPH YES )
set( DOXYGEN_CALL_GRAPH YES )
set( DOXYGEN_CALLER_GRAPH YES )
set( DOXYGEN_COLLABORATION_GRAPH YES )
set( DOXYGEN_BUILTIN_STL_SUPPORT YES )
set( DOXYGEN_EXTRACT_PRIVATE YES )
set( DOXYGEN_EXTRACT_PACKAGE YES )
set( DOXYGEN_EXTRACT_STATIC YES )
set( DOXYGEN_EXTRACT_LOCALMETHODS YES )
set( DOXYGEN_UML_LOOK YES )
set( DOXYGEN_UML_LIMIT_NUM_FIELDS 50 )
set( DOXYGEN_TEMPLATE_RELATIONS YES )
set( DOXYGEN_DOT_GRAPH_MAX_NODES 100 )
set( DOXYGEN_MAX_DOT_GRAPH_DEPTH 0 )
set( DOXYGEN_DOT_TRANSPARENT YES )
doxygen_add_docs( doxygen ${CMAKE_CURRENT_SOURCE_DIR} )
else (DOXYGEN_FOUND)
message("Doxygen is not installed - no documentation will be generated")
endif (DOXYGEN_FOUND)
#################################
# Install section
#################################
......@@ -71,8 +100,13 @@ install(TARGETS ${LIBRARY_NAME} RUNTIME DESTINATION ${PYTHON_API_PREFIX}/CFML_ap
else()
install(TARGETS ${LIBRARY_NAME} LIBRARY DESTINATION ${PYTHON_API_PREFIX}/CFML_api)
endif()
# Installing example files
install(DIRECTORY "../Examples" DESTINATION ${PYTHON_API_PREFIX} FILES_MATCHING PATTERN "*.py")
install(DIRECTORY "../Examples/Data" DESTINATION ${PYTHON_API_PREFIX}/Examples FILES_MATCHING PATTERN "*.cfl" PATTERN "*.cif")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Examples" DESTINATION ${PYTHON_API_PREFIX} FILES_MATCHING PATTERN "*.py")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Examples/Data" DESTINATION ${PYTHON_API_PREFIX}/Examples FILES_MATCHING PATTERN "*.cfl" PATTERN "*.cif")
# Installing tests files
install(DIRECTORY "../Tests" DESTINATION ${PYTHON_API_PREFIX} FILES_MATCHING PATTERN "*.py")
\ No newline at end of file
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Tests" DESTINATION ${PYTHON_API_PREFIX} FILES_MATCHING PATTERN "*.py")
# Installing documentation files
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doxygen/html" DESTINATION ${PYTHON_API_PREFIX}/Doc)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment