Disable /WX for clang-cl
This commit is contained in:
parent
b158bc1f94
commit
12c091e0ce
@ -69,6 +69,12 @@ function(set_file_warnings)
|
||||
${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