diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-12-17 14:13:28 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-12-17 14:13:28 +0100 |
commit | 3bb166dd5c014df9d5e9bea1479773ee406c0088 (patch) | |
tree | 08da8e2d97320ca7f2ffdedf73d59c465190c179 | |
parent | a3cb947f720820524522b26dcabf88a54c25526c (diff) |
Build: Fixed warning about disabling warnings
-rw-r--r-- | dep/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt index 515fd3c0e52..ca34b2eeba1 100644 --- a/dep/CMakeLists.txt +++ b/dep/CMakeLists.txt @@ -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) |