Use pedantic warnings

From the gcc manual:
Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard specified by any -std option used.

Note: ISO C++98 doesn't support the "long long" data type, so we disable that warning
-Winit-self can be removed as it's enabled by -Wall
This commit is contained in:
Timothy Rae 2017-03-31 12:40:58 +09:00
parent 400ab71fa3
commit 2123ef0348

View File

@ -32,7 +32,7 @@ else (MSVC)
set(CPPLINT_ARG_OUTPUT "--output=eclipse")
set(CPPCHECK_ARG_TEMPLATE "--template=gcc")
# Useful compile flags and extra warnings
add_compile_options(-fstack-protector -Wall -Wextra -Winit-self -Wswitch-enum -Wshadow -Winline)
add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline)
if (CMAKE_COMPILER_IS_GNUCXX)
# GCC flags
if (SQLITECPP_USE_GCOV AND CMAKE_COMPILER_IS_GNUCXX)