From 75642ef7aacca6af01f3816fa21e4724a36501a5 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sat, 10 Dec 2022 23:36:48 -0700 Subject: [PATCH] Enable warnings as errors for clang-cl.exe --- cmake/CompilerWarnings.cmake | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index 395075a3..a4adde8b 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -6,12 +6,6 @@ function(set_target_warnings target) option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" TRUE) - # For now if we're using MSVC-like clang interface on Windows - # we'll disable warnings as errors - if(SFML_OS_WINDOWS AND SFML_COMPILER_CLANG_CL) - set(WARNINGS_AS_ERRORS FALSE) - endif() - if(SFML_COMPILER_MSVC) target_compile_options(${target} PRIVATE $<$:/WX> @@ -79,7 +73,7 @@ function(set_target_warnings target) ) endif() - if(SFML_COMPILER_CLANG) + if(SFML_COMPILER_CLANG OR SFML_COMPILER_CLANG_CL) target_compile_options(${target} PRIVATE -Wno-unknown-warning-option # do not warn on GCC-specific warning diagnostic pragmas )