- Removed a bug with attempt to include pure c headers
- Added some more information about the license - fennec::file implementation
This commit is contained in:
@@ -9,16 +9,14 @@ add_subdirectory(external/sdl)
|
||||
# CppTrace is a dependency of the project, added as a git submodule
|
||||
add_subdirectory(external/cpptrace)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 26)
|
||||
set(CMAKE_C_STANDARD 26)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_C_STANDARD 23)
|
||||
|
||||
# find dependencies
|
||||
find_package(Doxygen)
|
||||
|
||||
# any necessary include directories
|
||||
include_directories(include)
|
||||
include_directories(external/cpptrace/include)
|
||||
include_directories(external/sdl/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
# Metaprogramming is a dependency for generating various type info before compilation of the engine.
|
||||
add_subdirectory(metaprogramming)
|
||||
@@ -32,6 +30,9 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/${FENNEC_BUILD_NAME})
|
||||
|
||||
# add the test suite as a sub-project
|
||||
add_subdirectory(test)
|
||||
|
||||
add_library(fennec STATIC
|
||||
|
||||
# CORE =================================================================================================================
|
||||
@@ -133,9 +134,9 @@ add_library(fennec STATIC
|
||||
|
||||
# add metaprogramming templates as a dependency and also force documentation to be generated when fennec is compiled
|
||||
if(DOXYGEN_FOUND)
|
||||
add_dependencies(fennec fennecdocs metaprogramming SDL3-shared cpptrace::cpptrace)
|
||||
add_dependencies(fennec fennecdocs metaprogramming) # SDL3-shared cpptrace::cpptrace)
|
||||
else()
|
||||
add_dependencies(fennec metaprogramming SDL3-shared cpptrace::cpptrace)
|
||||
add_dependencies(fennec metaprogramming) # SDL3-shared cpptrace::cpptrace)
|
||||
endif()
|
||||
|
||||
# Compiler Warning Flags
|
||||
@@ -143,10 +144,13 @@ if(MSVC)
|
||||
add_compile_options("/W4" "/WX") # All MSVC Warnings throw as Errors
|
||||
else()
|
||||
add_compile_options("-Wall" "-Wextra" "-pedantic" "-Werror") # All gcc/etc. Warnings throw as errors
|
||||
|
||||
target_compile_definitions(fennec PRIVATE _GLIBCXX_INCLUDE_NEXT_C_HEADERS __USE_FILE_OFFSET64)
|
||||
endif()
|
||||
|
||||
target_compile_options(fennec PUBLIC "-mavx" "-mavx2" "-mavx512f") # SIMD Instructions, automatic vectorization will occur
|
||||
|
||||
|
||||
target_link_options(fennec PRIVATE "-nostdlib" "-fno-exceptions" "-fno-rtti" "-fdiagnostics-all-candidates") # Do not compile base fennec library with c++ stdlib
|
||||
# fennec does not use the C++ stdlib because it is bloated, difficult to read, and implementation defined.
|
||||
# This implementation is designed to be as readable as possible, and expose information that would otherwise be obfuscated
|
||||
@@ -154,10 +158,6 @@ target_link_options(fennec PRIVATE "-nostdlib" "-fno-exceptions" "-fno-rtti" "-f
|
||||
target_link_libraries(fennec PRIVATE SDL3-shared cpptrace::cpptrace)
|
||||
|
||||
|
||||
# add the test suite as a sub-project
|
||||
add_subdirectory(test)
|
||||
|
||||
|
||||
|
||||
# DOXYGEN ==============================================================================================================
|
||||
# https://vicrucann.github.io/tutorials/quick-cmake-doxygen/
|
||||
|
||||
Reference in New Issue
Block a user