Remove CompileOptionsOverride
These overrides existed to prevent MSVC errors related to duplicate compiler warnings. Because we required a version of CMake older 3.15, CMake would add /W3 as a default compiler flag when using MSVC. We then add /W4 in addition to that. Modern CMake versions seem to deduplicate these warnings but older versions did not. The easist fix is to raise the minimum CMake version to 3.15 which changes the default behavior to no longer add /W3 without being explicitly specified. See the below link for more information about this behavior change. https://cmake.org/cmake/help/latest/policy/CMP0092.html
This commit is contained in:
parent
829cf3b502
commit
3301c47755
@ -1,7 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
# customize the compiler options CMake uses to initialize variables with
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/CompilerOptionsOverride.cmake")
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
# define a macro that helps defining an option
|
||||
macro(sfml_set_option var default type docstring)
|
||||
|
@ -1,5 +0,0 @@
|
||||
if(MSVC)
|
||||
# remove default warning level from CMAKE_CXX_FLAGS_INIT
|
||||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT}")
|
||||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS_INIT}")
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user