From 23279d2f465fe67e6003c8ade25d4ad69927b95b Mon Sep 17 00:00:00 2001 From: srcejon Date: Thu, 23 Jan 2025 22:57:16 +0000 Subject: [PATCH] Fix gcc warnings about warning options --- cmake/Modules/CompilerOptions.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/CompilerOptions.cmake b/cmake/Modules/CompilerOptions.cmake index 75b6981719..64f84c72a7 100644 --- a/cmake/Modules/CompilerOptions.cmake +++ b/cmake/Modules/CompilerOptions.cmake @@ -19,7 +19,11 @@ if(WIN32) endif() if(NOT MSVC) - add_compile_options(-Wall -Wextra -Wvla -Woverloaded-virtual -Wno-inconsistent-missing-override -ffast-math -fno-finite-math-only -ftree-vectorize) + add_compile_options(-Wall -Wextra -Wvla -ffast-math -fno-finite-math-only -ftree-vectorize) + add_compile_options($<$:-Woverloaded-virtual>) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + add_compile_options(-Wno-inconsistent-missing-override) + endif() else() # Disable some warnings, so more useful warnings aren't hidden in the noise # 4996 'fopen': This function or variable may be unsafe. Consider using fopen_s instead.