Inital commit
This commit is contained in:
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "dependencies/tracy"]
|
||||
path = dependencies/tracy
|
||||
url = https://github.com/wolfpld/tracy.git
|
||||
[submodule "dependencies/Catch2"]
|
||||
path = dependencies/Catch2
|
||||
url = https://github.com/catchorg/Catch2.git
|
||||
35
CMakeLists.txt
Normal file
35
CMakeLists.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
# /CMakeLists.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.25.0)
|
||||
project(Game LANGUAGES CXX C)
|
||||
|
||||
enable_testing()
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CMAKE_MESSAGE_LOG_LEVEL DEBUG CACHE STRING "CMake messaging level")
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/data)
|
||||
|
||||
#Enable cmake_modules
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
|
||||
include(common)
|
||||
|
||||
message("-- CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
|
||||
string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE)
|
||||
|
||||
PlatformPreSetup()
|
||||
CompilerPreSetup()
|
||||
message("-- FGL_FLAGS: ${FGL_FLAGS}")
|
||||
|
||||
include(dependencies/tracy)
|
||||
include(dependencies/Catch2)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
|
||||
SetVersionInfo()
|
||||
CompilerPostSetup()
|
||||
11
cmake_modules/apple.cmake
Normal file
11
cmake_modules/apple.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
# /cmake_modules/apple.cmake
|
||||
|
||||
if (APPLE)
|
||||
set(which_program "which")
|
||||
set(os_path_separator "/")
|
||||
function(PlatformPreSetup)
|
||||
endfunction()
|
||||
|
||||
function(PlatformPostSetup)
|
||||
endfunction()
|
||||
endif ()
|
||||
23
cmake_modules/clang.cmake
Normal file
23
cmake_modules/clang.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
function(CompilerPreSetup)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
#These two flags added with older gcc versions and Qt causes a compiler segfault -Wmismatched-tags -Wredundant-tags
|
||||
# STL has some warnings that prevent -Werror level compilation "-Wnull-dereference"
|
||||
set(FGL_WARNINGS "-Wall -Wundef -Wextra -Wpessimizing-move -Wpedantic -Weffc++ -pedantic-errors -Wuninitialized -Wunused -Wunused-parameter -Winit-self -Wconversion -Wextra-semi -Wsuggest-override -Wno-format-zero-length -Wmissing-include-dirs -Wshift-overflow -Walloca -Wsign-promo -Wconversion -Wpacked -Wredundant-decls -Wctor-dtor-privacy -Wdeprecated-copy-dtor -Wold-style-cast -Woverloaded-virtual -Wzero-as-null-pointer-constant -Wwrite-strings -Wunused-const-variable -Wdouble-promotion -Wpointer-arith -Wcast-qual -Wconversion -Wsign-conversion -Wimplicit-fallthrough -Wmisleading-indentation -Wdangling-else -Wdate-time -Wformat=2 -Wswitch-default")
|
||||
|
||||
set(FGL_CONFIG "-std=c++20")
|
||||
set(FGL_DEBUG "-Og -g -fstrict-aliasing -fno-omit-frame-pointer -fstack-check -ftrapv -fverbose-asm")
|
||||
#Generates system specific stuff (IE requires AVX)
|
||||
set(FGL_SYSTEM_SPECIFIC "-march=native -fgcse -fgcse-las -fgcse-sm -fdeclone-ctor-dtor -fdevirtualize-speculatively -ftree-loop-im -fivopts -ftree-loop-ivcanon -fira-hoist-pressure -fsched-pressure -fsched-spec-load -fipa-pta -flto=auto -s -ffat-lto-objects -fno-enforce-eh-specs -fstrict-enums -funroll-loops")
|
||||
#Generates safe optimization flags
|
||||
set(FGL_SYSTEM_SAFE "-O3 -fdevirtualize-at-ltrans -s")
|
||||
set(FGL_FLAGS_DEBUG "${FGL_WARNINGS} ${FGL_CONFIG} ${FGL_DEBUG}")
|
||||
set(FGL_FLAGS_SYSTEM "${FLG_CONFIG} -DNDEBUG ${FGL_SYSTEM_SAFE} ${FGL_SYSTEM_SPECIFIC}")
|
||||
set(FGL_FLAGS_RELEASE "${FGL_CONFIG} -DNDEBUG -s ${FGL_SYSTEM_SAFE} ${FGL_WARNINGS} -Werror")
|
||||
set(FGL_FLAGS_RELWITHDEBINFO "${FGL_CONFIG} -DNDEBUG -g ${FGL_SYSTEM_SAFE} ${FGL_SYSTEM_SPECIFIC}")
|
||||
set(FGL_FLAGS "${FGL_FLAGS_${UPPER_BUILD_TYPE}}" PARENT_SCOPE) # PARENT_SCOPE sends the variable up one level.
|
||||
endif ()
|
||||
endfunction()
|
||||
|
||||
function(CompilerPostSetup)
|
||||
|
||||
endfunction()
|
||||
44
cmake_modules/common.cmake
Normal file
44
cmake_modules/common.cmake
Normal file
@@ -0,0 +1,44 @@
|
||||
# /cmake_modules/common.cmake
|
||||
|
||||
message(DEBUG "Entering ${CMAKE_CURRENT_LIST_FILE}")
|
||||
message(DEBUG "Platform: ${CMAKE_CXX_PLATFORM_ID}")
|
||||
message(DEBUG "Compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
message(DEBUG "Compiler: ${CMAKE_CXX_COMPILER}")
|
||||
set(BINARY_FOLDER "${CMAKE_BINARY_DIR}/bin")
|
||||
include(utils)
|
||||
include(qt)
|
||||
|
||||
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_PLATFORM_ID} STREQUAL "MinGW"))
|
||||
include(gcc)
|
||||
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
include(clang)
|
||||
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
include(msvc)
|
||||
else ()
|
||||
message(WARNING "Unknown Compiler")
|
||||
#Define dummy PreCompilerSetup for unknown compilers. Later on, this will be replaced by a proper error message
|
||||
function(PreCompilerSetup)
|
||||
message(WARNING "Unknown Compiler! Dummy PreCompilerSetup")
|
||||
endfunction()
|
||||
function(PostCompilerSetup)
|
||||
message(WARNING "Unknown Compiler! Dummy PostCompilerSetup")
|
||||
endfunction()
|
||||
endif ()
|
||||
|
||||
if ((WIN32))
|
||||
message(DEBUG "Compiling for Windows")
|
||||
include(win32)
|
||||
elseif (APPLE)
|
||||
message(DEBUG "Compiling for Apple")
|
||||
elseif (UNIX)
|
||||
message(DEBUG "Compiling for Unix")
|
||||
include(linux)
|
||||
else ()
|
||||
message(DEBUG "Unknown Platform")
|
||||
endif ()
|
||||
|
||||
include(feature_checks)
|
||||
include(versioninfo)
|
||||
include(profiling)
|
||||
include(docs)
|
||||
message(DEBUG "Leaving ${CMAKE_CURRENT_LIST_FILE}")
|
||||
2
cmake_modules/dependencies/blurhash.cmake
Normal file
2
cmake_modules/dependencies/blurhash.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/dependencies/blurhash)
|
||||
set_target_properties(BlurhashCXX PROPERTIES COMPILE_FLAGS ${FGL_FLAGS})
|
||||
1
cmake_modules/dependencies/catch2.cmake
Normal file
1
cmake_modules/dependencies/catch2.cmake
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/dependencies/catch2)
|
||||
9
cmake_modules/dependencies/fmt.cmake
Normal file
9
cmake_modules/dependencies/fmt.cmake
Normal file
@@ -0,0 +1,9 @@
|
||||
if (NOT HAS_STD_FORMAT AND NOT ATLAS_IGNORE_STD_FORMAT EQUAL 1)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/dependencies/fmt)
|
||||
set(ATLAS_LINK_FMT 1)
|
||||
option(SPDLOG_FMT_EXTERNAL "" ON)
|
||||
else ()
|
||||
option(SPDLOG_FMT_EXTERNAL "" OFF)
|
||||
#dummy lib to link to
|
||||
set(ATLAS_LINK_FMT 0)
|
||||
endif ()
|
||||
13
cmake_modules/dependencies/glfw.cmake
Normal file
13
cmake_modules/dependencies/glfw.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
if (WIN32)
|
||||
if (DEFINED ENV{GLFW_PATH})
|
||||
message("-- GLFW_PATH defined as: $ENV{GLFW_PATH}.")
|
||||
list(APPEND CMAKE_PREFIX_PATH $ENV{GLFW_PATH})
|
||||
find_package(glfw3 REQUIRED)
|
||||
else ()
|
||||
message("-- GLFW_PATH not defined. Using submodule instead")
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/dependencies/glfw3)
|
||||
endif ()
|
||||
else ()
|
||||
find_package(glfw3 REQUIRED)
|
||||
endif ()
|
||||
5
cmake_modules/dependencies/glm.cmake
Normal file
5
cmake_modules/dependencies/glm.cmake
Normal file
@@ -0,0 +1,5 @@
|
||||
if (WIN32)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/dependencies/glm)
|
||||
else ()
|
||||
find_package(glm REQUIRED)
|
||||
endif ()
|
||||
11
cmake_modules/dependencies/gtest.cmake
Normal file
11
cmake_modules/dependencies/gtest.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
include(FetchContent)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
|
||||
)
|
||||
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
11
cmake_modules/dependencies/lz4.cmake
Normal file
11
cmake_modules/dependencies/lz4.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
set(LZ4_DIR ${CMAKE_SOURCE_DIR}/dependencies/lz4/lib)
|
||||
|
||||
file(GLOB_RECURSE LZ4_SOURCES ${LZ4_DIR}/*.c)
|
||||
|
||||
add_library(lz4 STATIC ${LZ4_SOURCES})
|
||||
target_include_directories(lz4 PUBLIC ${LZ4_DIR})
|
||||
|
||||
if (WIN32)
|
||||
#target_compile_definitions(${CMAKE_SOURCE_DIR}/dependencies/lz4 PRIVATE UNICODE=1)
|
||||
target_compile_definitions(lz4 PRIVATE LZ4_DEBUG=0)
|
||||
endif ()
|
||||
13
cmake_modules/dependencies/qt.cmake
Normal file
13
cmake_modules/dependencies/qt.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
#Verify after setting QT_PATH
|
||||
if (DEFINED QT_PATH)
|
||||
message("-- QT_PATH defined as ${QT_PATH}.")
|
||||
list(APPEND CMAKE_PREFIX_PATH ${QT_PATH})
|
||||
else ()
|
||||
message("-- QT_PATH not defined.")
|
||||
endif ()
|
||||
|
||||
find_package(Qt6 COMPONENTS Widgets Core Concurrent Network Test Charts REQUIRED)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
1
cmake_modules/dependencies/spdlog.cmake
Normal file
1
cmake_modules/dependencies/spdlog.cmake
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/dependencies/spdlog)
|
||||
13
cmake_modules/dependencies/tracy.cmake
Normal file
13
cmake_modules/dependencies/tracy.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_UPPER_BUILD_TYPE)
|
||||
|
||||
message("-- Cmake upper: ${CMAKE_UPPER_BUILD_TYPE}")
|
||||
|
||||
if (CMAKE_UPPER_BUILD_TYPE STREQUAL "DEBUG")
|
||||
set(TRACY_ENABLE ON)
|
||||
set(TRACY_ON_DEMAND ON)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/dependencies/tracy)
|
||||
|
||||
1
cmake_modules/dependencies/vulkan.cmake
Normal file
1
cmake_modules/dependencies/vulkan.cmake
Normal file
@@ -0,0 +1 @@
|
||||
find_package(Vulkan REQUIRED)
|
||||
22
cmake_modules/docs.cmake
Normal file
22
cmake_modules/docs.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
option(BUILD_DOC "Build documentation" ON)
|
||||
|
||||
if (DEFINED BUILD_DOCS AND BUILD_DOCS)
|
||||
|
||||
find_package(Doxygen)
|
||||
if (DOXYGEN_FOUND)
|
||||
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/Doxyfile)
|
||||
set(DOXYGEN_OUT ${CMAKE_BINARY_DIR}/Doxyfile)
|
||||
|
||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||
|
||||
add_custom_target(doc_doxygen ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen"
|
||||
VERBATIM
|
||||
)
|
||||
else ()
|
||||
message("Doxygen need to be installed to generate the doxygen documentation")
|
||||
endif ()
|
||||
|
||||
endif ()
|
||||
6
cmake_modules/feature_checks.cmake
Normal file
6
cmake_modules/feature_checks.cmake
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
include(feature_checks/check_format)
|
||||
include(feature_checks/check_backtrace)
|
||||
6
cmake_modules/feature_checks/check_backtrace.cmake
Normal file
6
cmake_modules/feature_checks/check_backtrace.cmake
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
check_cxx_source_compiles(
|
||||
"#include <backtrace>\nint main(void){ std::basic_stacktrace thing { std::basic_stacktrace::current() }; return 0;}"
|
||||
HAVE_STD_BACKTRACE
|
||||
)
|
||||
8
cmake_modules/feature_checks/check_format.cmake
Normal file
8
cmake_modules/feature_checks/check_format.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
check_cxx_source_compiles(
|
||||
"#include <format>\nint main(void){ std::format(\"{}\", 1);return 0;}"
|
||||
HAVE_STD_FORMAT
|
||||
)
|
||||
|
||||
|
||||
129
cmake_modules/gcc.cmake
Normal file
129
cmake_modules/gcc.cmake
Normal file
@@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
function(AppendFlag FLAG_TEXT)
|
||||
set(FGL_WARNINGS "${FGL_WARNINGS} ${FLAG_TEXT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(CompilerPreSetup)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
#These two flags added with older gcc versions and Qt causes a compiler segfault -Wmismatched-tags -Wredundant-tags
|
||||
# STL has some warnings that prevent -Werror level compilation "-Wnull-dereference"
|
||||
|
||||
# Generic warnings.
|
||||
set(FGL_WARNINGS "-Wall -Wundef -Wextra -Wpedantic")
|
||||
|
||||
#AppendFlag("-Wno-changes-meaning") # Prevents accidently changing the type of things. Cannot define 1 things as another later
|
||||
AppendFlag("-Wdouble-promotion") #Prevents issue where you can do math as a double which might not be intended.
|
||||
AppendFlag("-Wnonnull") #Prevents passing null as an argument marked as nonnull attribute
|
||||
AppendFlag("-Wnull-dereference") #Warns about a possible null dereference. Compiler checks all possible paths
|
||||
#AppendFlag("-Wnrvo") #Compiler checks for return value optimization invalidations
|
||||
# Disabled because of older GCC compilers being unhappy with it
|
||||
#AppendFlag("-Winfinite-recursion") #Warns about infinite recursive calls
|
||||
AppendFlag("-Winit-self") #Yells at you if you init something with itself
|
||||
AppendFlag("-Wimplicit-fallthrough=4") # Warns about switch statements having a implicit fallthrough. must be marked with [[fallthrough]]
|
||||
AppendFlag("-Wignored-qualifiers") #Warns if qualifiers are used in return types. Which are ignored.
|
||||
AppendFlag("-Wno-ignored-attributes") #Warns if the compiler ignored an attribute and is unknown to the compiler
|
||||
AppendFlag("-Wmain") #Warns if the main function looks odd. (Wrong return type, ect)
|
||||
AppendFlag("-Wmisleading-indentation")#Warns if the indentation around an if/conditional could be misleading
|
||||
AppendFlag("-Wmissing-attributes") #Warns about missing attributes that are defined with a related function (attributes in the prototype but missing in the definition) (-Wall enabled)
|
||||
AppendFlag("-Wmissing-braces") #Warns when initalizing and missing braces during a aggregate or union initalization. (-Wall enabled)
|
||||
AppendFlag("-Wmissing-include-dirs") #Warns when missing a include dir that was supplied to the compiler
|
||||
AppendFlag("-Wmultistatement-macros") #Warns about odd behaviours with macros being used with conditionals that appear guarded by them
|
||||
AppendFlag("-Wparentheses") #Warns about unnecessary parentheses or other weird cases. (Also warns of a case x<=y<=z being seen as (<=y ? 1 : 0) <= z
|
||||
#AppendFlag("-Wno-self-move") # Prevents moving a value into itself. Which has no effect
|
||||
AppendFlag("-Wsequence-point") # Prevents some really weird shit like a = a++. Since due to the order of operations this results in undefined behaviour
|
||||
AppendFlag("-Wreturn-type") #Warns when a return type defaults to int.
|
||||
AppendFlag("-Wno-shift-count-negative") #Warns when a bitshift count is negative
|
||||
AppendFlag("-Wno-shift-count-overflow") #Warns when bitshifting will overflow the width
|
||||
AppendFlag("-Wswitch") #Warns when a switch lacks a case for it's given type.
|
||||
AppendFlag("-Wswitch-enum") #Warn when a switch misses an enum type in it's case list
|
||||
AppendFlag("-Wno-switch-outside-range") #Prevents a case outside of a switch's range.
|
||||
AppendFlag("-Wno-switch-unreachable") #Warns when a case value can possible not be reached
|
||||
AppendFlag("-Wunused") #Enables a bunch of warnings that relate to things stated but never used.
|
||||
AppendFlag("-Wuninitialized") #Warns about values being uninitalized. Where accessing them might be UB in some situations
|
||||
AppendFlag("-Wmaybe-uninitialized") #Warns when a value MIGHT not be initalized upon access.
|
||||
AppendFlag("-Wunknown-pragmas") #Self explanitory
|
||||
AppendFlag("-Wno-prio-ctor-dtor") #Yells about the developer setting priority to compiler reserved values for ctor/dtors
|
||||
AppendFlag("-Wstrict-aliasing=3") #Included in -Wall. Prevents aliasing rule breaking
|
||||
AppendFlag("-Wstrict-overflow=2") #Trys to hint at using values that won't overflow or will have the smallest chance of overflowing. Example. x+2 > y -> x+1 >= y
|
||||
AppendFlag("-Wbool-operation") #Warn against weird operations on the boolean type. Such as bitwise operations ON the bool
|
||||
AppendFlag("-Wduplicated-branches") #Warns about branches that appear to do the same thing
|
||||
AppendFlag("-Wduplicated-cond") #Warns about a conditional branch having a matching condition for both sides
|
||||
AppendFlag("-Wtautological-compare") #Warns when comparing something to itself
|
||||
AppendFlag("-Wshadow") #Warns about shadowing any variables
|
||||
AppendFlag("-Wfree-nonheap-object") #Warns about freeing a object not on the heap.
|
||||
AppendFlag("-Wpointer-arith") #Warns about missuse of 'sizeof' on types with no size. (Such as void)
|
||||
AppendFlag("-Wtype-limits") #Warn about comparisons that might be always true/false due to the limitations of a types' ability to display large or small values
|
||||
AppendFlag("-Wundef") #Warns about undefined behaviour when evaluating undefined defines
|
||||
AppendFlag("-Wcast-qual") #Warns when a cast removes a const attribute from a pointer.
|
||||
AppendFlag("-Wcast-align") #Warns when casting can shift a byte boundary for the pointer
|
||||
AppendFlag("-Wcast-function-type") #Warns when a function pointer is cast to a incompatable function pointer.
|
||||
AppendFlag("-Wwrite-strings") #Warns about string literals to char* conversions
|
||||
AppendFlag("-Wclobbered") #Warns about variables that are changed by longjmp or vfork
|
||||
AppendFlag("-Wconversion") #Warns about conversions between real and integer numbers and conversions between signed/unsigned numbers
|
||||
AppendFlag("-Wdangling-else") #Warns about confusing else statements
|
||||
# Disabled because of older GCC compilers being unhappy with it
|
||||
#AppendFlag("-Wdangling-pointer=2") #Warns about use of pointers with automatic lifetime
|
||||
AppendFlag("-Wempty-body") #Warns about empty conditional bodies
|
||||
AppendFlag("-Wfloat-conversion") #Warns about reduction of precision from double -> float conversions
|
||||
AppendFlag("-Waddress") #Prevents off uses of addresses
|
||||
AppendFlag("-Wlogical-op") #Warns about strange uses of logical operations in expressions
|
||||
#TODO: Enable this again when I have time to properly clean it all up. Hiding the functions in a namespace is plenty.
|
||||
#AppendFlag("-Wmissing-declarations") #Warns about global functions without any previous declaration
|
||||
AppendFlag("-Wmissing-field-initializers") #Warns about a structure missing some fields in it's initalizer
|
||||
#Note: padded is for masochists. That's coming from me. Only really enable this if your ready for a fun time.
|
||||
#AppendFlag("-Wpadded")
|
||||
AppendFlag("-Wredundant-decls") #Warns about declarations that happen more then once.
|
||||
AppendFlag("-Wctor-dtor-privacy") #Warns if a class appears unusable due to private ctor/dtors
|
||||
AppendFlag("-Wdelete-non-virtual-dtor") #Warns about using `delete` on a class that has virtual functions without a virtual dtor
|
||||
# Disabled because of older GCC compilers being unhappy with it
|
||||
#AppendFlag("-Winvalid-constexpr") #Warns that a function marked as constexpr can't possibly produce a constexpr expression
|
||||
AppendFlag("-Wnoexcept") #Warns when a noexcept expression is false due to throwing
|
||||
AppendFlag("-Wnoexcept-type")
|
||||
AppendFlag("-Wclass-memaccess") #Warns about accessing memory of a class. Which is likely invalid
|
||||
AppendFlag("-Wregister") #Warns of use for `register` keyword. Which has been depreicated
|
||||
AppendFlag("-Wreorder") # Warns about initlization order being wrong in a class' init list
|
||||
AppendFlag("-Wno-pessimizing-move") #Warns about copy elision being prevented my std::move
|
||||
AppendFlag("-Wno-redundant-move") #Warns about a std::move being redundant
|
||||
AppendFlag("-Wredundant-tags") #Warns about a class-key and enum-key being redundant
|
||||
AppendFlag("-Weffc++") #THEEE warning. Forces you to follow c++ guidelines for effective C++
|
||||
AppendFlag("-Wold-style-cast") #Warns about using old style C casts
|
||||
AppendFlag("-Woverloaded-virtual") #Warns when a function does not overload
|
||||
AppendFlag("-Wsign-promo") #Warns about signed promotion without being explicit
|
||||
AppendFlag("-Wmismatched-new-delete") #Warns about using new and free instead of new and delete
|
||||
AppendFlag("-Wmismatched-tags") #Warns about mismatched tags for an object.
|
||||
#AppendFlag("-Wmultiple-inheritance") #Warns about multiple inheritance (Leading to the diamond inheritance model)
|
||||
AppendFlag("-Wzero-as-null-pointer-constant") #Warns about using literal zero as a null pointer comparison. Zero might not be nullptr on some machines.
|
||||
AppendFlag("-Wcatch-value=3") #Warns about catches not catching by reference.
|
||||
AppendFlag("-Wsuggest-final-types") #Self explanatory
|
||||
AppendFlag("-Wsuggest-final-methods")# ^
|
||||
AppendFlag("-Wsuggest-override")# ^
|
||||
# Disabled because of older GCC compilers being unhappy with it
|
||||
##AppendFlag("-Wuse-after-free") #Warns about accessing a value after calling 'free' on it
|
||||
AppendFlag("-Wuseless-cast") #Warns about a cast that is useless.
|
||||
|
||||
# Starting other weird flags
|
||||
AppendFlag("-fdiagnostics-show-template-tree") # Shows the template diagnostic info as a tree instead.
|
||||
AppendFlag("-fdiagnostics-path-format=inline-events")
|
||||
|
||||
#set(FGL_WARNINGS "${FGL_WARNINGS_GENERIC} -Wpessimizing-move -Wpedantic -Weffc++ -pedantic-errors -Wnoexcept -Wuninitialized -Wunused -Wunused-parameter -Winit-self -Wconversion -Wuseless-cast -Wextra-semi -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override -Wformat-signedness -Wno-format-zero-length -Wmissing-include-dirs -Wshift-overflow=2 -Walloc-zero -Walloca -Wsign-promo -Wconversion -Wduplicated-branches -Wduplicated-cond -Wshadow -Wshadow=local -Wvirtual-inheritance -Wno-virtual-move-assign -Wunsafe-loop-optimizations -Wnormalized -Wpacked -Wredundant-decls -Wctor-dtor-privacy -Wdeprecated-copy-dtor -Wstrict-null-sentinel -Wold-style-cast -Woverloaded-virtual -Wzero-as-null-pointer-constant -Wconditionally-supported -Wwrite-strings -Wunused-const-variable=2 -Wdouble-promotion -Wpointer-arith -Wcast-align=strict -Wcast-qual -Wconversion -Wsign-conversion -Wimplicit-fallthrough=1 -Wmisleading-indentation -Wdangling-else -Wdate-time -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation=2 -Wswitch-default -Wstringop-overflow=4 -Warray-bounds=2 -Wattribute-alias=2 -Wcatch-value=2 -Wplacement-new=2 -Wtrampolines -Winvalid-imported-macros -Winvalid-imported-macros")
|
||||
|
||||
set(FGL_CONFIG "-std=c++23 -fmax-errors=1 -fconcepts-diagnostics-depth=8 -Werror")
|
||||
|
||||
# Optimization flags
|
||||
set(FGL_OPTIMIZATION_FLAGS_RELEASE "-O2 -s -fdevirtualize-at-ltrans -fdevirtualize-speculatively -funroll-loops") # System agonistc flags
|
||||
set(FGL_OPTIMIZATION_FLAGS_DEBUG "-O0 -g -fstrict-aliasing -fno-omit-frame-pointer -ftrapv -fverbose-asm -femit-class-debug-always") # Debug flags
|
||||
set(FGL_OPTIMIZATION_FLAGS_SYSTEM "-march=native -flto=auto -fdeclone-ctor-dtor -fgcse -fgcse-las -fgcse-sm -ftree-loop-im -fivopts -ftree-loop-ivcanon -fira-hoist-pressure -fsched-pressure -fsched-spec-load -fipa-pta -s -ffat-lto-objects -fno-enforce-eh-specs -fstrict-enums") # System specific flags. Probably not portable
|
||||
set(FGL_OPTIMIZATION_FLAGS_RELWITHDEBINFO "-O2 -g -fdevirtualize-at-ltrans -fdevirtualize-speculatively -fdeclone-ctor-dtor -funroll-loops")
|
||||
|
||||
# Final sets
|
||||
set(FGL_FLAGS "${FGL_CONFIG} ${FGL_OPTIMIZATION_FLAGS_${UPPER_BUILD_TYPE}} ${FLG_WARNINGS}" PARENT_SCOPE) # Flags for our shit
|
||||
#set(FGL_FLAGS "${FGL_OPTIMIZATION_FLAGS_${UPPER_BUILD_TYPE}}" PARENT_SCOPE)
|
||||
set(FGL_CHILD_FLAGS "${FGL_OPTIMIZATION_FLAGS_${UPPER_BUILD_TYPE}}" PARENT_SCOPE) # Child flags for adding optmization to anything we build ourselves but doesn't follow our standard
|
||||
#set(CMAKE_CXX_FLAGS "${FGL_CHILD_FLAGS}")
|
||||
endif ()
|
||||
endfunction()
|
||||
|
||||
|
||||
function(CompilerPostSetup)
|
||||
endfunction()
|
||||
11
cmake_modules/linux.cmake
Normal file
11
cmake_modules/linux.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
# /cmake_modules/linux.cmake
|
||||
|
||||
if (UNIX AND (NOT APPLE))
|
||||
set(which_program "which")
|
||||
set(os_path_separator "/")
|
||||
function(PlatformPreSetup)
|
||||
endfunction()
|
||||
|
||||
function(PlatformPostSetup)
|
||||
endfunction()
|
||||
endif () # if(UNIX AND (NOT APPLE))
|
||||
23
cmake_modules/msvc.cmake
Normal file
23
cmake_modules/msvc.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
function(CompilerPreSetup)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
#These two flags added with older gcc versions and Qt causes a compiler segfault -Wmismatched-tags -Wredundant-tags
|
||||
# STL has some warnings that prevent -Werror level compilation "-Wnull-dereference"
|
||||
set(FGL_WARNINGS "-Wall -Wundef -Wextra -Wpessimizing-move -Wpedantic -Weffc++ -pedantic-errors -Wnoexcept -Wuninitialized -Wunused -Wunused-parameter -Winit-self -Wconversion -Wuseless-cast -Wextra-semi -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override -Wformat-signedness -Wno-format-zero-length -Wmissing-include-dirs -Wshift-overflow=2 -Walloc-zero -Walloca -Wsign-promo -Wconversion -Wduplicated-branches -Wduplicated-cond -Wshadow -Wshadow=local -Wvirtual-inheritance -Wno-virtual-move-assign -Wunsafe-loop-optimizations -Wnormalized -Wpacked -Wredundant-decls -Wctor-dtor-privacy -Wdeprecated-copy-dtor -Wstrict-null-sentinel -Wold-style-cast -Woverloaded-virtual -Wzero-as-null-pointer-constant -Wconditionally-supported -Wwrite-strings -Wunused-const-variable=2 -Wdouble-promotion -Wpointer-arith -Wcast-align=strict -Wcast-qual -Wconversion -Wsign-conversion -Wimplicit-fallthrough=1 -Wmisleading-indentation -Wdangling-else -Wdate-time -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation=2 -Wswitch-default -Wstringop-overflow=4 -Warray-bounds=2 -Wattribute-alias=2 -Wcatch-value=2 -Wplacement-new=2 -Wtrampolines -Winvalid-imported-macros -Winvalid-imported-macros")
|
||||
|
||||
set(FGL_CONFIG "-std=c++20 -fmax-errors=3 -fconcepts-diagnostics-depth=4")
|
||||
set(FGL_DEBUG "-Og -g -fstrict-aliasing -fno-omit-frame-pointer -fstack-check -ftrapv -fverbose-asm")
|
||||
#Generates system specific stuff (IE requires AVX)
|
||||
set(FGL_SYSTEM_SPECIFIC "-march=native -fgcse -fgcse-las -fgcse-sm -fdeclone-ctor-dtor -fdevirtualize-speculatively -ftree-loop-im -fivopts -ftree-loop-ivcanon -fira-hoist-pressure -fsched-pressure -fsched-spec-load -fipa-pta -flto=auto -s -ffat-lto-objects -fno-enforce-eh-specs -fstrict-enums -funroll-loops")
|
||||
#Generates safe optimization flags
|
||||
set(FGL_SYSTEM_SAFE "-O3 -fdevirtualize-at-ltrans -s")
|
||||
set(FGL_FLAGS_DEBUG "${FGL_WARNINGS} ${FGL_CONFIG} ${FGL_DEBUG}")
|
||||
set(FGL_FLAGS_SYSTEM "${FLG_CONFIG} -DNDEBUG ${FGL_SYSTEM_SAFE} ${FGL_SYSTEM_SPECIFIC}")
|
||||
set(FGL_FLAGS_RELEASE "${FGL_CONFIG} -DNDEBUG -s ${FGL_SYSTEM_SAFE} ${FGL_WARNINGS} -Werror")
|
||||
set(FGL_FLAGS_RELWITHDEBINFO "${FGL_CONFIG} -DNDEBUG -g ${FGL_SYSTEM_SAFE} ${FGL_SYSTEM_SPECIFIC}")
|
||||
set(FGL_FLAGS "${FGL_FLAGS_${UPPER_BUILD_TYPE}}" PARENT_SCOPE) # PARENT_SCOPE sends the variable up one level.
|
||||
endif ()
|
||||
endfunction()
|
||||
|
||||
function(CompilerPostSetup)
|
||||
|
||||
endfunction()
|
||||
23
cmake_modules/msys2.cmake
Normal file
23
cmake_modules/msys2.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
SET(COPY_MSYS2_BINARIES OFF CACHE BOOL "Whether to copy the DLLs from the corresponding MSYS2 prefix")
|
||||
IF (${COPY_MSYS2_BINARIES})
|
||||
GET_PARENT_PATH(${CMAKE_C_COMPILER} "/" compiler_folder)
|
||||
MESSAGE(DEBUG "compiler_folder: ${compiler_folder}")
|
||||
MESSAGE(DEBUG "BINARY FOLDER: ${BINARY_FOLDER}")
|
||||
SET(msys2_prefix_bin ${compiler_folder})
|
||||
FOREACH (
|
||||
DLL
|
||||
libsqlite3-0.dll
|
||||
libgcc_s_seh-1.dll
|
||||
libgcc_s_dw2-1.dll
|
||||
libstdc++-6.dll
|
||||
libwinpthread-1.dll
|
||||
)
|
||||
SET(file2copy "${msys2_prefix_bin}/${DLL}")
|
||||
IF (EXISTS ${file2copy})
|
||||
MESSAGE(DEBUG "COPYING: ${file2copy}")
|
||||
CONFIGURE_FILE(${file2copy} "${BINARY_FOLDER}/${DLL}" COPYONLY)
|
||||
endif () # EXISTS ${file2copy}
|
||||
ENDFOREACH ()
|
||||
ENDIF ()
|
||||
11
cmake_modules/profiling.cmake
Normal file
11
cmake_modules/profiling.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
option(ATLAS_PROFILE_ENABLE "" OFF)
|
||||
|
||||
if (${ATLAS_PROFILE_ENABLE} STREQUAL "ON")
|
||||
option(TRACY_ENABLE "" ON)
|
||||
option(TRACY_ON_DEMAND "" ON) #Reduces memory usage if profile isn't attached and makes memory profiling possible.
|
||||
option(TRACY_NO_BROADCAST "" ON)
|
||||
option(TRACY_NO_VSYNC_CAPTURE "" ON)
|
||||
option(TRACY_NO_FRAME_IMAGE "" ON)
|
||||
else ()
|
||||
option(TRACY_ENABLE "" OFF)
|
||||
endif ()
|
||||
4
cmake_modules/qt.cmake
Normal file
4
cmake_modules/qt.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
# /cmake_modules/qt.cmake
|
||||
|
||||
set(QT_VERSION "6.4.3" CACHE STRING "Version of Qt being used.")
|
||||
set(QT_PATH "C:/Qt/${QT_VERSION}/mingw_64" CACHE PATH "Prefix in which to find Qt.")
|
||||
24
cmake_modules/utils.cmake
Normal file
24
cmake_modules/utils.cmake
Normal file
@@ -0,0 +1,24 @@
|
||||
# /cmake_modules/utils.cmake
|
||||
|
||||
set(os_path_separator "")
|
||||
FUNCTION(GET_PARENT_PATH absolute_path path_separator return_var)
|
||||
message(DEBUG "absolute_path: ${absolute_path}")
|
||||
string(REPLACE ${path_separator} ";" absolute_path_list ${absolute_path}) # Converts Compiler path to ';' seperated list
|
||||
message(DEBUG "absolute_path_list: ${absolute_path_list}")
|
||||
LIST(POP_BACK absolute_path_list)
|
||||
message(DEBUG "absolute_path_list: ${absolute_path_list}")
|
||||
LIST(JOIN absolute_path_list "/" parent_path) # Converts ';' seperated list to path
|
||||
message(DEBUG "parent_path: ${parent_path}")
|
||||
SET(${return_var} ${parent_path} PARENT_SCOPE)
|
||||
RETURN(${return_var})
|
||||
ENDFUNCTION()
|
||||
|
||||
set(which_program "") # To be filled in by win32, linux, or apple modules.
|
||||
FUNCTION(WHICH program2find)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${which_program} ${program2find}
|
||||
RESULT_VARIABLE exit_code
|
||||
OUTPUT_VARIABLE return_value
|
||||
)
|
||||
|
||||
ENDFUNCTION()
|
||||
72
cmake_modules/versioninfo.cmake
Normal file
72
cmake_modules/versioninfo.cmake
Normal file
@@ -0,0 +1,72 @@
|
||||
# /cmake_modules/versioninfo.cmake
|
||||
|
||||
function(SetVersionInfo)
|
||||
endfunction()
|
||||
|
||||
# find_package(Git)
|
||||
# if (NOT Git_FOUND AND NOT DEFINED BYPASS_GIT_REQUIREMENT)
|
||||
# message(FATAL_ERROR
|
||||
# "HEY YOU! YEAH YOU! READ ME WITH YOUR EYES. Git was not found!
|
||||
# DO **NOT** **EXPECT** **SUPPORT** if your sending us log
|
||||
# information without filling these in manually or letting cmake find git.
|
||||
# Go read the docs to figure out how to do this. Or fix your git install for cmake")
|
||||
# endif ()
|
||||
#
|
||||
# if (DEFINED ATLAS_GIT_BRANCH)
|
||||
# message("-- Set git branch string to ${ATLAS_GIT_BRANCH}")
|
||||
# else ()
|
||||
# #Get the git branch us currently
|
||||
# execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE ATLAS_GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# message("-- Set git branch string to: ${ATLAS_GIT_BRANCH}")
|
||||
# endif ()
|
||||
#
|
||||
# if (DEFINED ATLAS_GIT_REVISION)
|
||||
# message("-- Set git revision to: ${ATLAS_GIT_REVISION}")
|
||||
# else ()
|
||||
# execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --format=%H WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE ATLAS_GIT_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# message("-- Set git revision to ${ATLAS_GIT_REVISION}")
|
||||
# endif ()
|
||||
#
|
||||
# if (DEFINED ATLAS_GIT_TAG)
|
||||
# message("-- Git tag set to: ${ATLAS_GIT_TAG}")
|
||||
# else ()
|
||||
# execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote --tags --sort=-v:refname https://github.com/KJNeko/Atlas.git v*.*.?
|
||||
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE ATLAS_REMOTE_V_TAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# string(REPLACE "\n" ";" ATLAS_REMOTE_V_TAGS_LIST ${ATLAS_REMOTE_V_TAGS})
|
||||
# list(LENGTH ATLAS_REMOTE_V_TAGS_LIST ATLAS_REMOTE_TAGS_COUNT)
|
||||
# message("-- Tag count: ${ATLAS_REMOTE_TAGS_COUNT}")
|
||||
# list(GET ATLAS_REMOTE_V_TAGS_LIST 0 ATLAS_LATEST_TAG)
|
||||
# message("-- Latest tag: ${ATLAS_LATEST_TAG}")
|
||||
# string(REPLACE "/" ";" ATLAS_TAG_SPLIT ${ATLAS_LATEST_TAG})
|
||||
# list(GET ATLAS_TAG_SPLIT 2 ATLAS_PURE_TAG)
|
||||
# message("-- Pure tag: ${ATLAS_PURE_TAG}")
|
||||
# if (ATLAS_PURE_TAG STREQUAL "")
|
||||
# message(FATAL_ERROR "Was unable to pull latest tag from git. Please define it manually via -DATLAS_GIT_TAG.")
|
||||
# endif ()
|
||||
# set(ATLAS_GIT_TAG ${ATLAS_PURE_TAG})
|
||||
# message("-- Git tag set to: ${ATLAS_GIT_TAG}")
|
||||
# endif ()
|
||||
#
|
||||
# if (DEFINED ATLAS_GIT_REVISION_BRIEF)
|
||||
# message("-- Set git revision to: ${ATLAS_GIT_REVISION_BRIEF}")
|
||||
# else ()
|
||||
# execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --format=%h WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE ATLAS_GIT_REVISION_BRIEF OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# message("-- Set git revision to ${ATLAS_GIT_REVISION_BRIEF}")
|
||||
# endif ()
|
||||
#
|
||||
# if (DEFINED ATLAS_GIT_CREATED_TIME)
|
||||
# message("-- Set git created time to: ${ATLAS_GIT_CREATED_TIME}")
|
||||
# else ()
|
||||
# string(TIMESTAMP ATLAS_GIT_CREATED_TIME)
|
||||
# message("-- Set git created time to ${ATLAS_GIT_CREATED_TIME}")
|
||||
# endif ()
|
||||
#
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_GIT_BRANCH="${ATLAS_GIT_BRANCH}")
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_GIT_TAG="${ATLAS_GIT_TAG}")
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_GIT_REVISION="${ATLAS_GIT_REVISION}")
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_GIT_REVISION_BRIEF="${ATLAS_GIT_REVISION_BRIEF}")
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_GIT_CREATED_TIME="${ATLAS_GIT_CREATED_TIME}")
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_COMPILER_ID="${CMAKE_CXX_COMPILER_ID}")
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_COMPILER_VER="${CMAKE_CXX_COMPILER_VERSION}")
|
||||
# target_compile_definitions(${PROJECT_NAME} PRIVATE ATLAS_PLATFORM_ID="${CMAKE_CXX_PLATFORM_ID}")
|
||||
#endfunction()
|
||||
23
cmake_modules/win32.cmake
Normal file
23
cmake_modules/win32.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# /cmake_modules/win32.cmake
|
||||
|
||||
if (WIN32)
|
||||
set(which_program "where")
|
||||
set(os_path_separator "\\")
|
||||
|
||||
set(
|
||||
NEEDED_QT_FOLDERS
|
||||
"${CMAKE_BINARY_DIR}/bin/data"
|
||||
"${CMAKE_BINARY_DIR}/bin/iconengines"
|
||||
"${CMAKE_BINARY_DIR}/bin/imageformats"
|
||||
"${CMAKE_BINARY_DIR}/bin/networkinformation"
|
||||
"${CMAKE_BINARY_DIR}/bin/platforms"
|
||||
"${CMAKE_BINARY_DIR}/bin/styles"
|
||||
"${CMAKE_BINARY_DIR}/bin/tls"
|
||||
)
|
||||
function(PlatformPreSetup)
|
||||
endfunction() # PlatformPreSetup
|
||||
|
||||
function(PlatformPostSetup)
|
||||
endfunction() # PlatformPostSetup
|
||||
|
||||
endif () # if (WIN32)
|
||||
1
dependencies/Catch2
vendored
Submodule
1
dependencies/Catch2
vendored
Submodule
Submodule dependencies/Catch2 added at f476bcb633
1
dependencies/tracy
vendored
Submodule
1
dependencies/tracy
vendored
Submodule
Submodule dependencies/tracy added at a2dd51ae4c
BIN
docs/libfgl_custom/TitorV2.png
Normal file
BIN
docs/libfgl_custom/TitorV2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 321 KiB |
6
docs/libfgl_custom/custom.css
Normal file
6
docs/libfgl_custom/custom.css
Normal file
@@ -0,0 +1,6 @@
|
||||
html {
|
||||
--top-height: 140px;
|
||||
--side-nav-fixed-width: 360px;
|
||||
--side-nav-arrow-opacity: 0.1;
|
||||
--side-nav-arrow-hover-opacity: 0.9;
|
||||
}
|
||||
89
docs/libfgl_custom/header_template.html
Normal file
89
docs/libfgl_custom/header_template.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!-- HTML header for doxygen 1.9.3-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<script type="text/javascript">var page_layout=1;</script>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css"/>
|
||||
<link rel="shortcut icon" href="$relpath^tempus.ico" type="image/x-icon"/>
|
||||
$extrastylesheet
|
||||
|
||||
|
||||
<!-- BEGIN CUSTOMIZATIONS -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript"> DoxygenAwesomeDarkModeToggle.init() </script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
|
||||
<script type="text/javascript"> DoxygenAwesomeFragmentCopyButton.init() </script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
|
||||
<script type="text/javascript"> DoxygenAwesomeParagraphLink.init() </script>
|
||||
<!-- END CUSTOMIZATIONS -->
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<!--BEGIN PROJECT_LOGO-->
|
||||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
|
||||
<!--END PROJECT_LOGO-->
|
||||
<!--BEGIN PROJECT_NAME-->
|
||||
<td id="projectalign">
|
||||
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||
</div>
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||
</td>
|
||||
<!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<td>
|
||||
<div id="projectbrief">$projectbrief</div>
|
||||
</td>
|
||||
<!--END PROJECT_BRIEF-->
|
||||
<!--END !PROJECT_NAME-->
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN !FULL_SIDEBAR-->
|
||||
<td>$searchbox</td>
|
||||
<!--END !FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
</tr>
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<tr>
|
||||
<td colspan="2">$searchbox</td>
|
||||
</tr>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
||||
240
docs/libfgl_custom/layout_template.xml
Normal file
240
docs/libfgl_custom/layout_template.xml
Normal file
@@ -0,0 +1,240 @@
|
||||
<doxygenlayout version="1.0">
|
||||
<!-- Generated by doxygen 1.9.3 -->
|
||||
<!-- Navigation index tabs for HTML output -->
|
||||
<navindex>
|
||||
<tab type="mainpage" visible="yes" title=""/>
|
||||
<tab type="pages" visible="yes" title="" intro=""/>
|
||||
<tab type="modules" visible="yes" title="Components" intro=""/>
|
||||
<tab type="namespaces" visible="yes" title="">
|
||||
<tab type="namespacelist" visible="yes" title="" intro=""/>
|
||||
<tab type="namespacemembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="concepts" visible="yes" title="">
|
||||
</tab>
|
||||
<tab type="interfaces" visible="yes" title="">
|
||||
<tab type="interfacelist" visible="yes" title="" intro=""/>
|
||||
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="classes" visible="yes" title="">
|
||||
<tab type="classlist" visible="yes" title="" intro=""/>
|
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="hierarchy" visible="yes" title="" intro=""/>
|
||||
<tab type="classmembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="structs" visible="yes" title="">
|
||||
<tab type="structlist" visible="yes" title="" intro=""/>
|
||||
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
</tab>
|
||||
<tab type="exceptions" visible="yes" title="">
|
||||
<tab type="exceptionlist" visible="yes" title="" intro=""/>
|
||||
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="files" visible="yes" title="">
|
||||
<tab type="filelist" visible="yes" title="" intro=""/>
|
||||
<tab type="globals" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="examples" visible="yes" title="" intro=""/>
|
||||
</navindex>
|
||||
|
||||
<!-- Layout definition for a class page -->
|
||||
<class>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_HEADERFILE"/>
|
||||
<inheritancegraph visible="$CLASS_GRAPH"/>
|
||||
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
|
||||
<memberdecl>
|
||||
<nestedclasses visible="yes" title=""/>
|
||||
<publictypes title=""/>
|
||||
<services title=""/>
|
||||
<interfaces title=""/>
|
||||
<publicslots title=""/>
|
||||
<signals title=""/>
|
||||
<publicmethods title=""/>
|
||||
<publicstaticmethods title=""/>
|
||||
<publicattributes title=""/>
|
||||
<publicstaticattributes title=""/>
|
||||
<protectedtypes title=""/>
|
||||
<protectedslots title=""/>
|
||||
<protectedmethods title=""/>
|
||||
<protectedstaticmethods title=""/>
|
||||
<protectedattributes title=""/>
|
||||
<protectedstaticattributes title=""/>
|
||||
<packagetypes title=""/>
|
||||
<packagemethods title=""/>
|
||||
<packagestaticmethods title=""/>
|
||||
<packageattributes title=""/>
|
||||
<packagestaticattributes title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
<privatetypes title=""/>
|
||||
<privateslots title=""/>
|
||||
<privatemethods title=""/>
|
||||
<privatestaticmethods title=""/>
|
||||
<privateattributes title=""/>
|
||||
<privatestaticattributes title=""/>
|
||||
<friends title=""/>
|
||||
<related title="" subtitle=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<services title=""/>
|
||||
<interfaces title=""/>
|
||||
<constructors title=""/>
|
||||
<functions title=""/>
|
||||
<related title=""/>
|
||||
<variables title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
</memberdef>
|
||||
<allmemberslink visible="yes"/>
|
||||
<usedfiles visible="$SHOW_USED_FILES"/>
|
||||
<authorsection visible="yes"/>
|
||||
</class>
|
||||
|
||||
<!-- Layout definition for a namespace page -->
|
||||
<namespace>
|
||||
<briefdescription visible="yes"/>
|
||||
<memberdecl>
|
||||
<nestednamespaces visible="yes" title=""/>
|
||||
<constantgroups visible="yes" title=""/>
|
||||
<interfaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<concepts visible="yes" title=""/>
|
||||
<structs visible="yes" title=""/>
|
||||
<exceptions visible="yes" title=""/>
|
||||
<typedefs title=""/>
|
||||
<sequences title=""/>
|
||||
<dictionaries title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<sequences title=""/>
|
||||
<dictionaries title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</namespace>
|
||||
|
||||
<!-- Layout definition for a concept page -->
|
||||
<concept>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_HEADERFILE"/>
|
||||
<definition visible="yes" title=""/>
|
||||
<detaileddescription title=""/>
|
||||
<authorsection visible="yes"/>
|
||||
</concept>
|
||||
|
||||
<!-- Layout definition for a file page -->
|
||||
<file>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||
<includegraph visible="$INCLUDE_GRAPH"/>
|
||||
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
|
||||
<sourcelink visible="yes"/>
|
||||
<memberdecl>
|
||||
<interfaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<structs visible="yes" title=""/>
|
||||
<exceptions visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<concepts visible="yes" title=""/>
|
||||
<constantgroups visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<sequences title=""/>
|
||||
<dictionaries title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<sequences title=""/>
|
||||
<dictionaries title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
</memberdef>
|
||||
<authorsection/>
|
||||
</file>
|
||||
|
||||
<!-- Layout definition for a group page -->
|
||||
<group>
|
||||
<briefdescription visible="yes"/>
|
||||
<groupgraph visible="$GROUP_GRAPHS"/>
|
||||
<memberdecl>
|
||||
<nestedgroups visible="yes" title=""/>
|
||||
<dirs visible="yes" title=""/>
|
||||
<files visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<concepts visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<sequences title=""/>
|
||||
<dictionaries title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<pagedocs/>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<sequences title=""/>
|
||||
<dictionaries title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</group>
|
||||
|
||||
<!-- Layout definition for a directory page -->
|
||||
<directory>
|
||||
<briefdescription visible="yes"/>
|
||||
<directorygraph visible="yes"/>
|
||||
<memberdecl>
|
||||
<dirs visible="yes"/>
|
||||
<files visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
</directory>
|
||||
</doxygenlayout>
|
||||
BIN
docs/libfgl_custom/tempus.ico
Normal file
BIN
docs/libfgl_custom/tempus.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
4
src/CMakeLists.txt
Normal file
4
src/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
add_subdirectory(IDHANClient)
|
||||
add_subdirectory(IDHAN)
|
||||
add_subdirectory(IDHANServer)
|
||||
14
src/IDHAN/CMakeLists.txt
Normal file
14
src/IDHAN/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
file(GLOB_RECURSE LIB_IDHAN_SOURCES "src/*.cpp")
|
||||
file(GLOB_RECURSE LIB_IDHAN_HEADERS "include/*.hpp")
|
||||
|
||||
add_library(IDHAN SHARED ${LIB_IDHAN_SOURCES} ${LIB_IDHAN_HEADERS})
|
||||
|
||||
target_include_directories(IDHAN PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
target_include_directories(IDHAN PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
12
tests/CMakeLists.txt
Normal file
12
tests/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
enable_testing()
|
||||
|
||||
file(GLOB_RECURSE FGL_TEST_SOURCES "*.cpp")
|
||||
|
||||
add_executable(IDHANTests ${FGL_TEST_SOURCES})
|
||||
target_link_libraries(IDHANTests IDHAN Catch2::Catch2WithMain)
|
||||
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
catch_discover_tests(IDHANTests)
|
||||
3
tests/src/dummy.cpp
Normal file
3
tests/src/dummy.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
//
|
||||
// Created by kj16609 on 2/21/24.
|
||||
//
|
||||
Reference in New Issue
Block a user