From eea584e84a0935a35ff31192c0386e2668cd7df3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 21 Aug 2019 22:40:54 +0200 Subject: 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. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3