summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-08-21 22:40:54 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-08-21 22:40:54 +0200
commiteea584e84a0935a35ff31192c0386e2668cd7df3 (patch)
treeb959e3f2774d30d88016f86fc7048cbc73748eeb
parent1eeacf3a51dbd7ddfc552919fc9dd3d498a9f971 (diff)
downloadapt-eea584e84a0935a35ff31192c0386e2668cd7df3.tar.gz
CMake: Pass -Werror=return-type to gcc
In C++, this warns about not returning in a function not returning void, which is undefined behavior and causes weird crashes. Make it an error.
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 354a6ae08..98e97473b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,7 @@ add_optional_compile_options(Wundef)
add_optional_compile_options(Wdouble-promotion)
add_optional_compile_options(Wsuggest-override)
add_optional_compile_options(Werror=suggest-override)
+add_optional_compile_options(Werror=return-type)
# apt-ftparchive dependencies
find_package(BerkeleyDB REQUIRED)
if (BERKELEY_DB_FOUND)