Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional -Werror flag #5

Merged
merged 30 commits into from
Oct 2, 2017
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
908771d
add optional -Werror flag
Aug 30, 2017
925861c
reproduce implicit conversion and throw
Aug 31, 2017
ba04b83
add checks for implicit conversion
Aug 31, 2017
f9b7a53
starting to set size limit
Aug 31, 2017
4a3f79a
assert specific error thrown
Sep 1, 2017
1c8c2bf
reset maxsize in tests
Sep 1, 2017
7d6c327
detangle DEBUG tests and enforce const max
Sep 1, 2017
0c6f3bc
short term fix to ensure roundtripping
Sep 19, 2017
344ad85
remove string arg function
Sep 19, 2017
1374863
update readme
Sep 19, 2017
88d2c16
remove string arg boolean function and update tests
Sep 19, 2017
daa89d1
handle flags per compiler
Sep 21, 2017
3d7e6ab
only need if for gnu
Sep 21, 2017
7412f05
see if including limits helps with errors
Sep 21, 2017
3e37ecc
include limits in decompress as well
Sep 21, 2017
9c0dd3c
try require instead of check
Sep 21, 2017
d5844e0
try to replicate leak without catch.hpp
Sep 21, 2017
804c5f7
remove compiler-specific set logic and properly handle exception to r…
Sep 26, 2017
1ca7f3f
properly end deflate
Sep 28, 2017
f6747c3
Merge branch 'master' into werror
Sep 28, 2017
238dba3
re-add tests
Sep 28, 2017
2026ac9
will add in a separate cleanup branch
Sep 28, 2017
99a1554
sync with master, keep werror flag for debug
Sep 28, 2017
11ec96f
add handy Dockerfile for local debugging
Sep 28, 2017
9cce0d9
turn werror on by default
Sep 28, 2017
4bd8899
add dockerignore file
Sep 28, 2017
81fb1ca
manage memory leak in decompress
Sep 28, 2017
e765e3d
add explicit make debug
Sep 28, 2017
a936540
remove deflateEnd during failed deflateInit
Sep 28, 2017
ccf354c
handle init errors
Oct 2, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ set(CMAKE_CXX_STANDARD_REQUIRED on)

include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mason.cmake)

option(WERROR "Add -Werror flag to build (turns warnings into errors)" ON)

# Note: -D_GLIBCXX_USE_CXX11_ABI=0 is needed to support mason packages that are precompiled libs
# Currently we only depend on a header only library, but this will help avoid issues when more libs are added via mason
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wsign-compare -Wconversion -Wshadow")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks as if you grabbed the comments about -D_GLIBCXX_USE_CXX11_ABI=0 without the actual flag being added to the CMAKE_CXX_FLAGS? Best to pull that over too.


if (WERROR)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()

# mason_use is a mason function within the mason.cmake file and provides ready-to-go vars, like "STATIC_LIBS" and "INCLUDE_DIRS"
mason_use(catch VERSION 1.9.6 HEADER_ONLY)
include_directories(SYSTEM ${MASON_PACKAGE_catch_INCLUDE_DIRS})
Expand Down