diff --git a/CMakeLists.txt b/CMakeLists.txt index 46b40d157b4..751ef111056 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,7 +164,6 @@ add_compile_options(-Wno-address-of-packed-member) add_compile_options(-Wcast-qual) add_compile_options(-Wdeprecated-copy) add_compile_options(-Wduplicated-cond) -add_compile_options(-Wno-expansion-to-defined) add_compile_options(-Wformat=2) add_compile_options(-Wimplicit-fallthrough) add_compile_options(-Wlogical-op) @@ -191,6 +190,8 @@ add_compile_options(-g1) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_compile_options(-Wno-literal-suffix) add_compile_options(-Wno-maybe-uninitialized) + # Only ignore expansion-to-defined for g++, clang's implementation doesn't complain about function-like macros + add_compile_options(-Wno-expansion-to-defined) add_compile_options(-Wcast-align) add_compile_options(-Wdouble-promotion) elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")