Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | add_compiler_flags( | ||||
-Wduplicated-branches | -Wduplicated-branches | ||||
-Wduplicated-cond | -Wduplicated-cond | ||||
-Wlogical-op | -Wlogical-op | ||||
) | ) | ||||
add_compiler_flag_group(-Wformat -Wformat-security) | add_compiler_flag_group(-Wformat -Wformat-security) | ||||
add_cxx_compiler_flags( | add_cxx_compiler_flags( | ||||
-Wredundant-move | -Wredundant-move | ||||
-Woverloaded-virtual | -Woverloaded-virtual | ||||
-Wsuggest-override | |||||
) | ) | ||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||||
# GCC has no flag variant which is granular enough to avoid raising the clang | # GCC has no flag variant which is granular enough to avoid raising the clang | ||||
# -Wshadow-uncaptured-local equivalent. This is causing a lot of warnings | # -Wshadow-uncaptured-local equivalent. This is causing a lot of warnings | ||||
# on serialize.h which cannot be disabled locally, so drop the flag. | # on serialize.h which cannot be disabled locally, so drop the flag. | ||||
add_compiler_flags( | add_compiler_flags( | ||||
-Wshadow | -Wshadow | ||||
-Wshadow-field | -Wshadow-field | ||||
) | ) | ||||
endif() | endif() | ||||
option(EXTRA_WARNINGS "Enable extra warnings" OFF) | option(EXTRA_WARNINGS "Enable extra warnings" OFF) | ||||
if(EXTRA_WARNINGS) | if(NOT EXTRA_WARNINGS) | ||||
add_cxx_compiler_flags(-Wsuggest-override) | |||||
else() | |||||
add_compiler_flags(-Wno-unused-parameter) | add_compiler_flags(-Wno-unused-parameter) | ||||
add_compiler_flags(-Wno-implicit-fallthrough) | add_compiler_flags(-Wno-implicit-fallthrough) | ||||
endif() | endif() | ||||
# libtool style configure | # libtool style configure | ||||
add_subdirectory(config) | add_subdirectory(config) | ||||
# Enable LFS (Large File Support) on targets that don't have it natively. | # Enable LFS (Large File Support) on targets that don't have it natively. | ||||
▲ Show 20 Lines • Show All 481 Lines • Show Last 20 Lines |