From 9db5eb960d2f261422e7f2a0324d1c23aa32447a Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 15 Oct 2024 15:06:10 -0700 Subject: [PATCH] Suppress some unhelpful warnings --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index acc18a8..198dae5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,15 @@ endif() add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum -Werror=switch-enum -fPIC) + +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + add_link_options("-Wno-unused-command-line-argument") +endif() + +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + add_compile_options("-Wno-maybe-uninitialized") +endif() + if(NOT APPLE) # This causes some versions of clang to crash on macos add_compile_options(-g -fno-omit-frame-pointer)