summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-05-12 18:43:51 (GMT)
committerGitHub <noreply@github.com>2020-05-12 18:43:51 (GMT)
commit12843822b09f0aa3f426387986354d9e1303e41e (patch)
tree4767f684151d96c8c1171247ecb38be2309c4c07
parent5b730038f94ec163b0e84dc15613dbc916a00824 (diff)
parent751c3c104eeb89613f07b74002585d70c012af97 (diff)
downloadDoxygen-12843822b09f0aa3f426387986354d9e1303e41e.zip
Doxygen-12843822b09f0aa3f426387986354d9e1303e41e.tar.gz
Doxygen-12843822b09f0aa3f426387986354d9e1303e41e.tar.bz2
Merge pull request #7770 from albert-github/feature/bug_compilation_warnings
GNU compilation warnings
-rw-r--r--cmake/CompilerWarnings.cmake11
1 files changed, 9 insertions, 2 deletions
diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake
index 41ee545..e6c1539 100644
--- a/cmake/CompilerWarnings.cmake
+++ b/cmake/CompilerWarnings.cmake
@@ -93,7 +93,6 @@ function(set_project_warnings project_name)
-Wno-unused-parameter
-Wno-sign-conversion
-Wno-format-nonliteral
- -Wno-implicit-fallthrough
# enable to turn warnings into errors
#-Werror
@@ -104,7 +103,15 @@ function(set_project_warnings project_name)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(PROJECT_WARNINGS ${CLANG_WARNINGS})
else()
- set(PROJECT_WARNINGS ${GCC_WARNINGS})
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.0.0")
+ set(GCC_EXTRA_WARNINGS
+ -Wno-implicit-fallthrough
+ )
+ else()
+ set(GCC_EXTRA_WARNINGS
+ )
+ endif()
+ set(PROJECT_WARNINGS ${GCC_WARNINGS} ${GCC_EXTRA_WARNINGS})
endif()
target_compile_options(${project_name} PRIVATE ${PROJECT_WARNINGS})