v0.1.0: 初始工程骨架 — 7模块 40头文件 32源文件 17文档 Apache-2.0

This commit is contained in:
ViewDesignEngine
2026-07-23 05:27:51 +00:00
commit 02d0520aa5
133 changed files with 5350 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# Compiler settings for ViewDesignEngine
# Include with: include(cmake/CompilerSettings.cmake)
# ── GCC / Clang ───────────────────────────────────
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
target_compile_options(vde_compile_options INTERFACE
-Wall -Wextra -Wpedantic
-Wshadow -Wnon-virtual-dtor
-Woverloaded-virtual -Wconversion
-Wsign-conversion -Wnull-dereference
-Wdouble-promotion -Wformat=2
)
if(ENABLE_SANITIZERS)
target_compile_options(vde_compile_options INTERFACE
-fsanitize=address,undefined -fno-omit-frame-pointer
)
target_link_options(vde_compile_options INTERFACE
-fsanitize=address,undefined
)
endif()
if(ENABLE_LTO AND CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_options(vde_compile_options INTERFACE -flto)
target_link_options(vde_compile_options INTERFACE -flto)
endif()
endif()
# ── MSVC ───────────────────────────────────────────
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(vde_compile_options INTERFACE
/W4 /permissive- /Zc:__cplusplus /utf-8
)
target_compile_definitions(vde_compile_options INTERFACE
_CRT_SECURE_NO_WARNINGS NOMINMAX
)
endif()
# ── 公共编译定义 ───────────────────────────────────
target_compile_definitions(vde_compile_options INTERFACE
VDE_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
VDE_VERSION_MINOR=${PROJECT_VERSION_MINOR}
)