build: Use -Wno-deprecated-copy for GCC 9+

OpenCascade causes a lot of warnings due to -Wdeprecated-copy on GCC 9+.
These warnings are also emitted with clang, but only once per file.
This commit is contained in:
Priit Laes
2021-03-20 21:23:05 +02:00
committed by Thomas Krijnen
parent 09bf5b85aa
commit 911d703f57
+4
View File
@@ -466,6 +466,10 @@ ElSE()
else()
add_definitions(-Wno-maybe-uninitialized)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)
# OpenCascade spews a lot of deprecated-copy warnings
add_definitions(-Wno-deprecated-copy)
endif()
# -fPIC is not relevant on Windows and creates pointless warnings
if (UNIX)
add_definitions(-fPIC)