Initial Commit
This commit is contained in:
113
CMakeLists.txt
Normal file
113
CMakeLists.txt
Normal file
@@ -0,0 +1,113 @@
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
project(fennec)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 26)
|
||||
set(CMAKE_C_STANDARD 26)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
add_library(fennec STATIC
|
||||
|
||||
# CORE =================================================================================================================
|
||||
include/fennec/core/engine.h source/core/engine.cpp
|
||||
|
||||
|
||||
# CONTAINERS ===========================================================================================================
|
||||
include/fennec/containers/array.h
|
||||
include/fennec/containers/dynarray.h
|
||||
|
||||
|
||||
# LANG =================================================================================================================
|
||||
include/fennec/lang/constants.h
|
||||
include/fennec/lang/conditional_types.h
|
||||
include/fennec/lang/intrinsics.h
|
||||
include/fennec/lang/limits.h
|
||||
include/fennec/lang/sequences.h
|
||||
include/fennec/lang/type_traits.h
|
||||
include/fennec/lang/type_transforms.h
|
||||
include/fennec/lang/types.h
|
||||
include/fennec/lang/utility.h
|
||||
|
||||
include/fennec/lang/detail/__type_traits.h
|
||||
|
||||
|
||||
# MEMORY ===============================================================================================================
|
||||
include/fennec/memory/allocator.h
|
||||
include/fennec/memory/bits.h
|
||||
include/fennec/memory/memory.h
|
||||
include/fennec/memory/new.h
|
||||
|
||||
source/memory/new.cpp
|
||||
|
||||
|
||||
# MATH =================================================================================================================
|
||||
include/fennec/math/math.h
|
||||
|
||||
include/fennec/math/scalar.h
|
||||
|
||||
include/fennec/math/vector.h
|
||||
include/fennec/math/vector_base.h
|
||||
include/fennec/math/vector_traits.h
|
||||
include/fennec/math/vector_storage.h
|
||||
|
||||
include/fennec/math/swizzle.h
|
||||
include/fennec/math/swizzle_storage.h
|
||||
|
||||
include/fennec/math/matrix.h
|
||||
|
||||
include/fennec/math/common.h
|
||||
include/fennec/math/exponential.h
|
||||
include/fennec/math/geometric.h
|
||||
include/fennec/math/trigonometric.h
|
||||
include/fennec/math/relational.h
|
||||
|
||||
include/fennec/math/detail/__fwd.h
|
||||
include/fennec/math/detail/__types.h
|
||||
include/fennec/math/detail/__vector_traits.h
|
||||
|
||||
)
|
||||
|
||||
add_subdirectory(metaprogramming)
|
||||
|
||||
add_dependencies(fennec fennecdocs metaprogramming)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options("/W4" "/WX")
|
||||
else()
|
||||
add_compile_options("-Wall" "-Wextra" "-pedantic" "-Werror")
|
||||
endif()
|
||||
|
||||
target_compile_options(fennec PUBLIC "-mavx" "-mavx2" "-mavx512f")
|
||||
target_link_options(fennec PRIVATE "-nostdlib" "-nocstdlib")
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
|
||||
|
||||
# DOXYGEN ==============================================================================================================
|
||||
# https://vicrucann.github.io/tutorials/quick-cmake-doxygen/
|
||||
|
||||
find_package(Doxygen)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
get_filename_component(DOXYGEN_PROJECT_NAME ${PROJECT_SOURCE_DIR} NAME)
|
||||
set(DOXYGEN_CONFIG_IN "${PROJECT_SOURCE_DIR}/doxy/Doxyfile.in")
|
||||
set(DOXYGEN_CONFIG_OUT "${PROJECT_SOURCE_DIR}/doxy/Doxyfile")
|
||||
|
||||
configure_file(${DOXYGEN_CONFIG_IN} ${DOXYGEN_CONFIG_OUT} @ONLY)
|
||||
message("Doxygen Build Started.")
|
||||
|
||||
add_custom_target(fennecdocs ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG_OUT}
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMENT "Generating Doxygen Documentation"
|
||||
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(fennecdocs-clean ALL
|
||||
COMMAND rm -r "${PROJECT_SOURCE_DIR}/docs/"
|
||||
COMMENT "Cleaning Doxygen Documentation"
|
||||
VERBATIM)
|
||||
else()
|
||||
message("Doxygen not found.")
|
||||
endif()
|
||||
Reference in New Issue
Block a user