-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
761 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Doxygen | ||
endcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_trailing_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
project(Khaos VERSION 0.0.0.0 DESCRIPTION "A C/C++ library to simplify cross-platform programming" HOMEPAGE_URL "https://github.com/flagarde/Khaos" LANGUAGES C CXX) | ||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
include(GetCMakeMM) | ||
cmmm(VERSION 2.2 REPOSITORY flagarde/CMakeMM) | ||
|
||
cmmm_modules_list(REPOSITORY flagarde/CMakeCM) | ||
|
||
project(Khaos VERSION 0.0.1.0 DESCRIPTION "A C/C++ library to simplify cross-platform programming" HOMEPAGE_URL "https://github.com/flagarde/Khaos" LANGUAGES C CXX) | ||
|
||
include(PreventInSourceBuilds) | ||
prevent_in_source_builds() | ||
|
||
include(DefaultInstallPrefix) | ||
default_install_prefix("${CMAKE_SOURCE_DIR}/install") | ||
|
||
option(BUILD_DOCS "Build the docs" ON) | ||
option(BUILD_TESTS "Build the tests" ON) | ||
|
||
add_subdirectory(src) | ||
|
||
if(BUILD_DOCS) | ||
add_subdirectory(docs) | ||
endif() | ||
|
||
if(BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
set noparent | ||
filter=-whitespace/braces | ||
linelength=250 | ||
root=include/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# cmake-format: off | ||
include_guard(GLOBAL) | ||
|
||
set(GET_CMMM_VERSION "1.0.0" CACHE INTERNAL "Version of GetCMakeMM.") | ||
|
||
# CMMM function | ||
function(cmmm) | ||
cmake_parse_arguments(CMMM "NO_COLOR" "VERSION;DESTINATION;INACTIVITY_TIMEOUT;TIMEOUT;REPOSITORY;PROVIDER" "" "${ARGN}") | ||
|
||
if(WIN32 OR DEFINED ENV{CLION_IDE} OR DEFINED ENV{DevEnvDir}) | ||
set(CMMM_NO_COLOR TRUE) | ||
elseif(NOT DEFINED CMMM_NO_COLOR) | ||
set(CMMM_NO_COLOR FALSE) | ||
endif() | ||
set_property(GLOBAL PROPERTY CMMM_NO_COLOR ${CMMM_NO_COLOR}) | ||
|
||
if(WIN32 OR (EXISTS $ENV{CLION_IDE}) OR (EXISTS $ENV{DevEnvDir}) OR (EXISTS $ENV{workspaceRoot})) | ||
set(CMMM_NO_COLOR TRUE) | ||
endif() | ||
|
||
if(NOT DEFINED CMMM_VERSION) | ||
set(CMMM_TAG "main") | ||
elseif(CMMM_VERSION STREQUAL "main") | ||
set(CMMM_TAG "${CMMM_VERSION}") | ||
else() | ||
set(CMMM_TAG "v${CMMM_VERSION}") | ||
endif() | ||
|
||
if(NOT DEFINED CMMM_DESTINATION) | ||
set(CMMM_DESTINATION "${CMAKE_BINARY_DIR}") | ||
endif() | ||
get_filename_component(CMMM_DESTINATION "${CMMM_DESTINATION}" ABSOLUTE BASE_DIR "${CMAKE_BINARY_DIR}") | ||
|
||
if(NOT DEFINED CMMM_INACTIVITY_TIMEOUT) | ||
set(CMMM_INACTIVITY_TIMEOUT "5") | ||
endif() | ||
|
||
if(NOT DEFINED CMMM_TIMEOUT) | ||
set(CMMM_TIMEOUT "10") | ||
endif() | ||
|
||
string(ASCII 27 Esc) | ||
|
||
if(NOT DEFINED CMMM_REPOSITORY) | ||
set(CMMM_REPOSITORY "flagarde/CMakeMM") | ||
endif() | ||
|
||
if(NOT DEFINED CMMM_PROVIDER OR CMMM_PROVIDER STREQUAL "github") | ||
set(CMMM_URL "https://raw.githubusercontent.com/${CMMM_REPOSITORY}") | ||
elseif("${CMMM_PROVIDER}" STREQUAL "gitlab") | ||
set(CMMM_URL "https://gitlab.com/${CMMM_REPOSITORY}/-/raw") | ||
elseif("${CMMM_PROVIDER}" STREQUAL "gitee") | ||
set(CMMM_URL "https://gitee.com/${CMMM_REPOSITORY}/raw") | ||
else() | ||
if(CMMM_NO_COLOR) | ||
message("## [CMakeMM] Provider \"${CMMM_PROVIDER}\" unknown. Fallback to \"github\" ##") | ||
else() | ||
message("${Esc}[1;33m## [CMakeMM] Provider \"${CMMM_PROVIDER}\" unknown. Fallback to \"github\" ##${Esc}[m") | ||
endif() | ||
set(CMMM_URL "https://raw.githubusercontent.com/${CMMM_REPOSITORY}") | ||
endif() | ||
|
||
if(NOT CMAKEMM_INITIALIZED_${CMMM_TAG} OR NOT EXISTS "${CMMM_DESTINATION}/CMakeMM-${CMMM_TAG}.cmake") | ||
|
||
if(CMMM_NO_COLOR) | ||
message("-- [CMakeMM] Downloading CMakeMM (${CMMM_TAG}) from ${CMMM_URL}/${CMMM_TAG}/CMakeMM.cmake to ${CMMM_DESTINATION}/CMakeMM-${CMMM_TAG}.cmake --") | ||
else() | ||
message("${Esc}[1;35m-- [CMakeMM] Downloading CMakeMM (${CMMM_TAG}) from ${CMMM_URL}/${CMMM_TAG}/CMakeMM.cmake ${CMMM_DESTINATION}/CMakeMM-${CMMM_TAG}.cmake --${Esc}[m") | ||
endif() | ||
|
||
file(DOWNLOAD "${CMMM_URL}/${CMMM_TAG}/CMakeMM.cmake" "${CMMM_DESTINATION}/CMakeMM-${CMMM_TAG}.cmake" INACTIVITY_TIMEOUT "${CMMM_INACTIVITY_TIMEOUT}" LOG LOG_ STATUS CMAKECM_STATUS TIMEOUT "${CMMM_TIMEOUT}") | ||
list(GET CMAKECM_STATUS 0 CMAKECM_CODE) | ||
list(GET CMAKECM_STATUS 1 CMAKECM_MESSAGE) | ||
if(${CMAKECM_CODE}) | ||
if(CMMM_NO_COLOR OR (CMAKE_VERSION VERSION_GREATER_EQUAL 3.21)) | ||
message(FATAL_ERROR "[CMakeMM] Error downloading CMakeMM.cmake : ${CMAKECM_MESSAGE}") | ||
else() | ||
message(FATAL_ERROR "${Esc}[31m[CMakeMM] Error downloading CMakeMM.cmake : ${CMAKECM_MESSAGE}${Esc}[m") | ||
endif() | ||
endif() | ||
|
||
endif() | ||
|
||
include("${CMMM_DESTINATION}/CMakeMM-${CMMM_TAG}.cmake") | ||
|
||
set(ARGN "URL;${CMMM_URL};DESTINATION;${CMMM_DESTINATION};INACTIVITY_TIMEOUT;${CMMM_INACTIVITY_TIMEOUT};TIMEOUT;${CMMM_TIMEOUT};TAG;${CMMM_TAG};${ARGN}") | ||
list(REMOVE_DUPLICATES ARGN) | ||
|
||
cmmm_entry("${ARGN}") | ||
|
||
endfunction() | ||
# cmake-format: on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
include(Documentations) | ||
set(DOXYGEN_STRIP_FROM_PATH "${PROJECT_SOURCE_DIR}/include/" "${PROJECT_BINARY_DIR}/include/") | ||
set(DOXYGEN_STRIP_FROM_INC_PATH "${PROJECT_SOURCE_DIR}/include/" "${PROJECT_BINARY_DIR}/include/") | ||
set(DOXYGEN_PROJECT_LOGO "${PROJECT_SOURCE_DIR}/docs/imgs/icon.png") | ||
set(DOXYGEN_RECURSIVE YES) | ||
set(DOXYGEN_JAVADOC_BLOCK YES) | ||
set(DOXYGEN_JAVADOC_AUTOBRIEF YES) | ||
set(DOXYGEN_EXTRACT_ALL YES) | ||
set(DOXYGEN_SOURCE_BROWSER YES) | ||
set(DOXYGEN_INLINE_SOURCES YES) | ||
set(DOXYGEN_SEARCHENGINE YES) | ||
set(DOXYGEN_SERVER_BASED_SEARCH NO) | ||
set(DOXYGEN_DISABLE_INDEX NO) | ||
set(DOXYGEN_GENERATE_TREEVIEW YES) | ||
set(DOXYGEN_INTERACTIVE_SVG YES) | ||
set(DOXYGEN_DOR_IMAGE_FORMAT svg) | ||
set(DOXYGEN_BUILTIN_STL_SUPPORT YES) | ||
set(DOXYGEN_TAB_SIZE 2) | ||
set(DOXYGEN_SOURCE_TOOLTIPS YES) | ||
set(DOXYGEN_HTML_DYNAMIC_MENUS YES) | ||
set(DOXYGEN_CLASS_DIAGRAMS YES) | ||
set(DOXYGEN_UML_LOOK YES) | ||
set(DOXYGEN_CALL_GRAPH YES) | ||
set(DOXYGEN_CALLER_GRAPH YES) | ||
set(DOXYGEN_FULL_PATH_NAMES YES) | ||
set(DOXYGEN_INLINE_SOURCES YES) | ||
set(DOXYGEN_ENABLE_PREPROCESSING YES) | ||
set(DOXYGEN_MACRO_EXPANSION NO) | ||
set(DOXYGEN_BUILTIN_STL_SUPPORT YES) | ||
## HTML OPTIONS ## | ||
set(DOXYGEN_GENERATE_HTML YES) | ||
## LATEX OPTIONS ## | ||
set(DOXYGEN_GENERATE_LATEX YES) | ||
set(DOXYGEN_COMPACT_LATEX NO) | ||
set(DOXYGEN_LATEX_BATCHMODE NO) | ||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/header.tex") | ||
set(DOXYGEN_LATEX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/header.tex") | ||
endif() | ||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/footer.tex") | ||
set(DOXYGEN_LATEX_FOOTER "${CMAKE_CURRENT_SOURCE_DIR}/footer.tex") | ||
endif() | ||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/styleSheet.sty") | ||
set(DOXYGEN_LATEX_EXTRA_STYLESHEET "${CMAKE_CURRENT_SOURCE_DIR}/styleSheet.sty") | ||
endif() | ||
set(DOXYGEN_LATEX_EXTRA_FILES "${PROJECT_SOURCE_DIR}/docs/imgs/logo.png") | ||
doxyfile_docs("${PROJECT_SOURCE_DIR}/include/" "${PROJECT_SOURCE_DIR}/src/" "${PROJECT_BINARY_DIR}/include/") |
Oops, something went wrong.