diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 0f1fc34ed28..4288cf4bdd0 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -316,9 +316,9 @@ else() endif() endif() -check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) -check_cxx_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" - SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) +check_cxx_compiler_flag("-Wvariadic-macros" SUPPORTS_VARIADIC_MACROS_FLAG) +check_cxx_compiler_flag("-Wgnu-zero-variadic-macro-arguments" + SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) set(USE_NO_MAYBE_UNINITIALIZED 0) set(USE_NO_UNINITIALIZED 0) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 0eb16974517..56ba1479d7e 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -1011,11 +1011,11 @@ function(add_unittest test_suite test_name) list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0) endif () - if (SUPPORTS_NO_VARIADIC_MACROS_FLAG) + if (SUPPORTS_VARIADIC_MACROS_FLAG) list(APPEND LLVM_COMPILE_FLAGS "-Wno-variadic-macros") endif () # Some parts of gtest rely on this GNU extension, don't warn on it. - if(SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) + if(SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) list(APPEND LLVM_COMPILE_FLAGS "-Wno-gnu-zero-variadic-macro-arguments") endif() diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt index dadca65b3ae..16a35451274 100644 --- a/utils/unittest/CMakeLists.txt +++ b/utils/unittest/CMakeLists.txt @@ -21,10 +21,10 @@ if(WIN32) add_definitions(-DGTEST_OS_WINDOWS=1) endif() -if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) +if(SUPPORTS_VARIADIC_MACROS_FLAG) add_definitions("-Wno-variadic-macros") endif() -if(SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) +if(SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) add_definitions("-Wno-gnu-zero-variadic-macro-arguments") endif() if(CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)