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(