ignore unused variable warning
This commit is contained in:
parent
d16c76f693
commit
f152134f20
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue