|
@@ -30,6 +30,14 @@ function(SDL_AddCommonCompilerFlags TARGET)
|
|
|
option(SDL_WERROR "Enable -Werror" OFF)
|
|
|
|
|
|
get_property(TARGET_TYPE TARGET "${TARGET}" PROPERTY TYPE)
|
|
|
+ if(MSVC)
|
|
|
+ cmake_push_check_state()
|
|
|
+ check_c_compiler_flag("/W3" COMPILER_SUPPORTS_W3)
|
|
|
+ if(COMPILER_SUPPORTS_W3)
|
|
|
+ target_compile_options(${TARGET} PRIVATE "/W3")
|
|
|
+ endif()
|
|
|
+ cmake_pop_check_state()
|
|
|
+ endif()
|
|
|
|
|
|
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
|
|
if(MINGW)
|