diff --git a/CMakeLists.txt b/CMakeLists.txt index 549036d42..320482902 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,7 +436,7 @@ if("Ninja" STREQUAL ${CMAKE_GENERATOR}) endif() # Add -Werror to C/C++ flags for newer compilers -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) +if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") endif()