mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
cmake: tiny cleanup
This commit is contained in:
parent
56d380b9b6
commit
c8c730c8dc
@ -293,8 +293,6 @@ if (${GNUC})
|
|||||||
option(EVENT__ENABLE_GCC_FUNCTION_SECTIONS "Enable gcc function sections" OFF)
|
option(EVENT__ENABLE_GCC_FUNCTION_SECTIONS "Enable gcc function sections" OFF)
|
||||||
option(EVENT__ENABLE_GCC_WARNINGS "Make all GCC warnings into errors" OFF)
|
option(EVENT__ENABLE_GCC_WARNINGS "Make all GCC warnings into errors" OFF)
|
||||||
|
|
||||||
set(GCC_V ${CMAKE_C_COMPILER_VERSION})
|
|
||||||
|
|
||||||
list(APPEND __FLAGS
|
list(APPEND __FLAGS
|
||||||
-Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
|
-Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
|
||||||
-Wundef
|
-Wundef
|
||||||
@ -317,14 +315,14 @@ if (${GNUC})
|
|||||||
|
|
||||||
-Wwrite-strings
|
-Wwrite-strings
|
||||||
|
|
||||||
# Disable unused-function warnings. These trigger for minheap-internal.h.
|
# Disable unused-function warnings. These trigger for minheap-internal.h.
|
||||||
-Wno-unused-function
|
-Wno-unused-function
|
||||||
)
|
)
|
||||||
|
|
||||||
if (${CLANG})
|
if (${CLANG})
|
||||||
list(APPEND __FLAGS
|
list(APPEND __FLAGS
|
||||||
# we use this hack in tests
|
# we use this hack in tests
|
||||||
-Wno-void-pointer-to-enum-cast)
|
-Wno-void-pointer-to-enum-cast)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (EVENT__DISABLE_GCC_WARNINGS)
|
if (EVENT__DISABLE_GCC_WARNINGS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user