Added documentation generation as CMake target for Release
This commit is contained in:
parent
5ee86709ee
commit
c3ec86de87
6
.gitignore
vendored
6
.gitignore
vendored
@ -7,3 +7,9 @@ cmake-build-debug/
|
||||
|
||||
\.idea/
|
||||
*.lzw
|
||||
|
||||
docs/Doxyfile
|
||||
|
||||
docs/html/
|
||||
|
||||
docs/latex/
|
||||
|
@ -7,15 +7,6 @@ set(TGT "projet_lzw")
|
||||
set(${TGT}_VERSION_MAJOR 0)
|
||||
set(${TGT}_VERSION_MINOR 1)
|
||||
|
||||
message("CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
|
||||
IF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
message("Debug build.")
|
||||
ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
message("Release build.")
|
||||
ELSE()
|
||||
message("Some other build.")
|
||||
ENDIF()
|
||||
|
||||
set(CXX_COVERAGE_COMPILE_FLAGS "-pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wsign-conversion -Wshadow -Weffc++ -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline -Wunused -Wnon-virtual-dtor -pthread")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CXX_COVERAGE_COMPILE_FLAGS} -DDebug -g -pg")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CXX_COVERAGE_COMPILE_FLAGS} -O3")
|
||||
@ -34,8 +25,6 @@ else()
|
||||
message( FATAL_ERROR "C++17 not supported, CMake will exit." )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
@ -45,6 +34,26 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "../debug/")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}")
|
||||
|
||||
# indicate the doc build as an option, ON by default
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^[Rr]elease")
|
||||
option(BUILD_DOC "Build documentation" ON)
|
||||
find_package(Doxygen
|
||||
REQUIRED dot)
|
||||
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("Doxygen build started")
|
||||
add_custom_target(docs ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen"
|
||||
VERBATIM )
|
||||
else()
|
||||
message("Doxygen needs to be installed to generate the doxygen documentation.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(includes)
|
||||
file(GLOB SOURCES "src/*.cc")
|
||||
add_executable(${TGT} ${SOURCES})
|
||||
|
3
doc/.gitignore
vendored
3
doc/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
!Doxyfile
|
2440
doc/Doxyfile
2440
doc/Doxyfile
File diff suppressed because it is too large
Load Diff
33
docs/Doxyfile.in
Normal file
33
docs/Doxyfile.in
Normal file
@ -0,0 +1,33 @@
|
||||
OUTPUT_DIRECTORY = @CMAKE_CURRENT_SOURCE_DIR@/docs/
|
||||
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src/ @CMAKE_CURRENT_SOURCE_DIR@/docs
|
||||
DOXYFILE ENCODING = UTF-8
|
||||
PROJECT_NAME = "Compression LZW"
|
||||
PROJECT_NUMBER = 0.3
|
||||
PROJECT_BRIEF = "Utilitaire de compression/décompression de fichiers via l’algorithme LZW"
|
||||
ALLOW_UNICODE_NAMES = YES
|
||||
OUTPUT_LANGUAGE = French
|
||||
FULL_PATH_NAMES = NO
|
||||
TAB_SIZE = 2
|
||||
EXTRACT_ALL = YES
|
||||
CASE_SENSE_NAMES = YES
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = *.cc \
|
||||
*.hh
|
||||
RECURSIVE = YES
|
||||
EXAMPLE_PATTERNS = *
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
USE_HTAGS = NO
|
||||
HTML_TIMESTAMP = YES
|
||||
GENERATE_DOCSET = NO
|
||||
GENERATE_HTMLHELP = NO
|
||||
LATEX_SOURCE_CODE = YES
|
||||
LATEX_TIMESTAMP = YES
|
||||
ENABLE_PREPROCESSING = NO
|
||||
HAVE_DOT = YES
|
||||
UML_LOOK = YES
|
||||
CALL_GRAPH = YES
|
||||
CALLER_GRAPH = YES
|
||||
INTERACTIVE_SVG = YES
|
Loading…
Reference in New Issue
Block a user