ignore unused variable warning

This commit is contained in:
wangjiyu 2025-04-09 15:08:20 +08:00
parent d16c76f693
commit f152134f20
1 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,9 @@ endif (BUILD_SHARED_LIBS)
if (NOT ${CMAKE_PLATFORM_NAME} STREQUAL "Windows" AND CMAKE_CXX_COMPILER_ID MATCHES GNU) if (NOT ${CMAKE_PLATFORM_NAME} STREQUAL "Windows" AND CMAKE_CXX_COMPILER_ID MATCHES GNU)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror) target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror)
endif () endif ()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wno-error=unused-variable) # 使
endif()
include(GenerateExportHeader) include(GenerateExportHeader)
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/exports/drogon/exports.h) generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/exports/drogon/exports.h)