Disable /WX for clang-cl
This commit is contained in:
parent
b158bc1f94
commit
12c091e0ce
@ -68,7 +68,13 @@ function(set_file_warnings)
|
||||
# -Wimplicit-fallthrough # warn when a missing break causes control flow to continue at the next case in a switch statement (disabled until better compiler support for explicit fallthrough is available)
|
||||
${NON_ANDROID_CLANG_AND_GCC_WARNINGS}
|
||||
)
|
||||
|
||||
|
||||
# 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(WARNINGS_AS_ERRORS)
|
||||
set(CLANG_AND_GCC_WARNINGS ${CLANG_AND_GCC_WARNINGS} -Werror)
|
||||
set(MSVC_WARNINGS ${MSVC_WARNINGS} /WX)
|
||||
|
@ -107,6 +107,11 @@ if(MSVC)
|
||||
elseif(MSVC_VERSION LESS_EQUAL 1939)
|
||||
set(SFML_MSVC_VERSION 17)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(SFML_COMPILER_CLANG_CL 1)
|
||||
endif()
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(SFML_COMPILER_CLANG 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user