Removing warnings from Windows Ninja configuration
Windows Ninja build was complaining about /W4 and /W3 being specified, and C++ latest and C++ 17. This fixs those complaints.
This commit is contained in:
@@ -26,7 +26,13 @@ macro(linklibs project)
|
||||
endmacro()
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/WX /W4 /wd4127 /wd4324 /wd4201 /std:c++latest)
|
||||
# Force to always compile with W4
|
||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
endif()
|
||||
add_compile_options(/WX /wd4127 /wd4324 /wd4201)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user