Fixes for gcc 9 / -Werror=deprecated-copy

Also enable -Werror-deprecated-copy for GCC version 9 and later.
This commit is contained in:
Timo Suoranta
2019-10-18 17:28:53 +03:00
parent 834ee546f9
commit f0a85fc744
4 changed files with 11 additions and 8 deletions

View File

@@ -95,6 +95,9 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions)
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
add_compile_options(-fno-rtti)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.0.0")
add_compile_options(-Werror=deprecated-copy)
endif()
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable)