mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Enable warnings as errors for clang-cl.exe
This commit is contained in:
parent
e54bf87e9b
commit
75642ef7aa
@ -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
|
||||
$<$<BOOL:${WARNINGS_AS_ERRORS}>:/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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user