Skip to content

Commit

Permalink
fix(tools): disable spurious GCC warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrechette committed Oct 3, 2023
1 parent 7b219ee commit 91104a4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/CMakeCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ macro(setup_default_compiler_flags _project_name)
target_compile_options(${_project_name} PRIVATE -Werror) # Treat warnings as errors

# Disable various warnings that are harmless
target_compile_options(${_project_name} PRIVATE -Wno-c++98-compat) # No need to support C++98
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(${_project_name} PRIVATE -Wno-c++98-compat) # No need to support C++98
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
target_compile_options(${_project_name} PRIVATE -Wno-attributes) # False positive with earlier versions of GCC
endif()
endif()

if (PLATFORM_EMSCRIPTEN)
# Remove '-g' from compilation flags since it sometimes crashes the compiler
Expand Down

0 comments on commit 91104a4

Please sign in to comment.