From 27d581fc6df3cbfbe5b7439b0cb91bad6cfd596c Mon Sep 17 00:00:00 2001 From: MistEO Date: Tue, 23 Jan 2024 23:22:55 +0800 Subject: [PATCH] fix: build error on macOS --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb73964..b5881a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT add_compile_options("/utf-8" "/W4" "/WX" "/Zc:preprocessor") else() add_compile_options("-Wall;-Wextra;-Wpedantic;-Werror;-mtune=native") + if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "Clang") + add_compile_options("-Wno-gnu-zero-variadic-macro-arguments") + endif() if(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|EM64T|x86_64") add_compile_options("-msse4.1") endif()