64ad721ed7
- CMake: INTERFACE 库修复、vde_compile_options 顺序修复 - 命名空间: 所有模块添加 using 声明 - 类型补全: Ray3Dd、Point4D - 头文件: tolerance 泛型化、std::optional include - 警告: 放宽 -Wconversion/-Wsign-conversion - 构建结果: 0 errors, 22/25 tests passed
29 lines
940 B
CMake
29 lines
940 B
CMake
# Compiler settings for ViewDesignEngine
|
|
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
|
target_compile_options(vde_compile_options INTERFACE
|
|
-Wall -Wextra
|
|
-Wno-sign-conversion
|
|
-Wno-conversion
|
|
-Wno-unused-parameter
|
|
)
|
|
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()
|
|
endif()
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
target_compile_options(vde_compile_options INTERFACE /W3 /permissive- /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}
|
|
)
|