diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2021-03-03 04:10:02 +0000 |
---|---|---|
committer | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2021-05-19 03:52:45 +0100 |
commit | 8eacd615c8437bcb058d01d2446f8149ae9fda25 (patch) | |
tree | 28f04016f8c3754d82c7d96b1d7ddbacdd9c23a1 /CMakeOptions.txt | |
parent | 1ad447aab9ecd2938e5125722374e514074425ab (diff) |
Disable assertions for release builds
Currently our build generates very many warnings if
G_DISABLE_ASSERT is defined.
Add ws_assert() and ws_assert_not_reached() to incrementally
replace existing assertions and then disable them using
WS_DISABLE_ASSERT.
Assertions are disabled with CMake build type Release.
By default the build type is RelWithDebInfo so the current
behaviour of enabling assertions by default is (for now) preserved.
Add some notes to README.Developer.
Diffstat (limited to 'CMakeOptions.txt')
-rw-r--r-- | CMakeOptions.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeOptions.txt b/CMakeOptions.txt index a7297f361e..799ed2165b 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -44,6 +44,7 @@ endif() option(BUILD_mmdbresolve "Build MaxMind DB resolver" ON) option(DISABLE_WERROR "Do not treat warnings as errors" OFF) +option(DISABLE_ASSERT "Disable assertions" OFF) option(DISABLE_FRAME_LARGER_THAN_WARNING "Disable warning if the size of a function frame is large" OFF) option(EXTCAP_ANDROIDDUMP_LIBPCAP "Build androiddump using libpcap" OFF) option(ENABLE_EXTRA_COMPILER_WARNINGS "Do additional compiler warnings (disables -Werror)" OFF) |