aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1cf871a3..e33c4e0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,6 +28,10 @@ CHECK_CXX_COMPILER_FLAG("-Wpedantic" PEDANTIC_FLAG_SUPPORTED)
if ( PEDANTIC_FLAG_SUPPORTED AND NOT CMAKE_CXX_FLAGS MATCHES "(^| )pedantic($| )")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
endif ( )
+CHECK_CXX_COMPILER_FLAG("-Werror=return-type" WERROR_FLAG_SUPPORTED)
+if ( WERROR_FLAG_SUPPORTED )
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type")
+endif ( )
if ( CMAKE_VERSION VERSION_LESS "3.1" )
CHECK_CXX_COMPILER_FLAG("-std=c++11" STD_FLAG_SUPPORTED)