From 761eaa552b955a7aeea96996dcfd6df9fea68e84 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 5 Sep 2025 11:39:04 -0400 Subject: [PATCH] Add -Wno-deprecated-literal-operator for clang --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6e9ed2..a3152d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,15 @@ include_directories(src) find_package(weaseljson REQUIRED) +# Suppress deprecated literal operator warnings globally (from nlohmann_json and +# toml11) +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wno-unknown-warning-option + -Wno-deprecated-literal-operator) +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # GCC doesn't have deprecated-literal-operator warning, so no need to suppress +endif() + # Generate JSON token hash table using gperf find_program(GPERF_EXECUTABLE gperf REQUIRED) add_custom_command(