Build: Fixed warning about disabling warnings
This commit is contained in:
1 parent
d5be7e414f
commit
83bee6000b
1 file changed
+3
@@ -9,8 +9,11 @@
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# Search twice, once for space after /W argument, once for end of line as CMake regex has no \b
|
||||
string(REGEX REPLACE "/W[0-4] " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string(REGEX REPLACE "/W[0-4]$" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string(REGEX REPLACE "/W[0-4] " "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string(REGEX REPLACE "/W[0-4]$" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
add_definitions(/W0)
|
||||
else()
|
||||
add_definitions(-w)
|
||||
|
||||
Reference in new issue
Block a user