From 9cd29e5166d4cdf35bf66ac016d5b0cfae7620a9 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 24 Jun 2019 22:11:49 +0200 Subject: [PATCH] cmake: Add -Wno-redundant-mode This warns about one bit in env_dispatch, where a comment explains that the move *is* necessary, on a different libc++. --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 19b098b0c..03ec972d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,14 @@ endif() # - comment because we use a bunch of those, and they're not really all that harmful. # - address, because that occurs for our mkostemp check (weak-linking requires us to compare `&mkostemp == nullptr`). # - strict-aliasing, because on old GCCs (*Travis*) those are triggered by maybe.h, so you get it every time it is included. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-implicit-fallthrough -Wno-comment -Wno-address -Wno-strict-aliasing") +# - redundant-move, because we have one that is required on old libc +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra \ +-Wno-implicit-fallthrough \ +-Wno-comment \ +-Wno-address \ +-Wno-strict-aliasing \ +-Wno-redundant-move \ +") # Disable exception handling. ADD_COMPILE_OPTIONS(-fno-exceptions)