Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | |||||
# Enable warning | # Enable warning | ||||
add_c_compiler_flag(-Wnested-externs -Wstrict-prototypes) | add_c_compiler_flag(-Wnested-externs -Wstrict-prototypes) | ||||
add_compiler_flag( | add_compiler_flag( | ||||
-Wall | -Wall | ||||
-Wextra | -Wextra | ||||
-Wformat | -Wformat | ||||
-Wvla | -Wvla | ||||
-Wformat-security | -Wformat-security | ||||
-Wimplicit-fallthrough | |||||
Fabien: We want to remove it because it is part of Wextra since gcc7. No need to enable it first. | |||||
-Wcast-align | -Wcast-align | ||||
-Wunused-parameter | -Wunused-parameter | ||||
-Wmissing-braces | -Wmissing-braces | ||||
# FIXME: Activating this flag cause cmake to fail on leveldb. | # FIXME: Activating this flag cause cmake to fail on leveldb. | ||||
# -Wthread-safety-analysis | # -Wthread-safety-analysis | ||||
-Wshadow | -Wshadow | ||||
) | ) | ||||
option(EXTRA_WARNINGS "Enable extra warnings" OFF) | option(EXTRA_WARNINGS "Enable extra warnings" OFF) | ||||
if(EXTRA_WARNINGS) | if(EXTRA_WARNINGS) | ||||
add_cxx_compiler_flag(-Wsuggest-override) | add_cxx_compiler_flag(-Wsuggest-override) | ||||
else() | else() | ||||
add_compiler_flag(-Wno-unused-parameter) | add_compiler_flag(-Wno-unused-parameter) | ||||
add_compiler_flag(-Wno-implicit-fallthrough) | |||||
endif() | endif() | ||||
# Create a target for OpenSSL | # Create a target for OpenSSL | ||||
include(BrewHelper) | include(BrewHelper) | ||||
find_brew_prefix(OPENSSL_ROOT_DIR openssl) | find_brew_prefix(OPENSSL_ROOT_DIR openssl) | ||||
find_package(OpenSSL REQUIRED) | find_package(OpenSSL REQUIRED) | ||||
# libtool style configure | # libtool style configure | ||||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |
We want to remove it because it is part of Wextra since gcc7. No need to enable it first.