Skip to content

Commit

Permalink
Use pedantic warnings
Browse files Browse the repository at this point in the history
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
  • Loading branch information
timrae committed Mar 31, 2017
1 parent 400ab71 commit 2123ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2123ef0

Please sign in to comment.