Matching clang.

This commit is contained in:
Chris Mumford 2020-12-15 11:17:28 -08:00
parent 955a5dd1b3
commit e9a6a08439
1 changed files with 1 additions and 2 deletions

View File

@ -67,8 +67,7 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra") endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra")
# Use -Werror for clang only. # Use -Werror for clang only.
# There are many clang compiler ID's, but only one gcc. if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GCC")
if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")