maybe this is OK

This commit is contained in:
2024-10-22 15:10:41 +00:00
parent ba2ee1c5f6
commit 5e9479a412

View File

@ -26,14 +26,14 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
endif() endif()
# 设置 Release 模式下开启优化 # 设置 Release 模式下开启优化
if(CMAKE_BUILD_TYPE STREQUAL "Release") # if(CMAKE_BUILD_TYPE STREQUAL "Release")
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") # if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wall -Wextra -Wpedantic -fsanitize=address,undefined -O2) # add_compile_options(-Wall -Wextra -Wpedantic -fsanitize=address,undefined -O2)
add_link_options(-fsanitize=address,undefined) # add_link_options(-fsanitize=address,undefined)
elseif(MSVC) # elseif(MSVC)
add_compile_options(/O2) # add_compile_options(/O2)
endif() # endif()
endif() # endif()
include(FetchContent) include(FetchContent)
# FetchContent_Declare( # FetchContent_Declare(