diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2020-11-11 11:52:54 (GMT) |
---|---|---|
committer | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2020-11-11 11:52:54 (GMT) |
commit | d709a37d14dd37610eea32991c6df8a1a62a25ee (patch) | |
tree | b2b7ccda7b27d6d51289da1cae1d991b113712e0 /CMakeLists.txt | |
parent | 3094b5c289b418b31e63ad2e7f52a38cf64e3dfc (diff) | |
download | Ninja-d709a37d14dd37610eea32991c6df8a1a62a25ee.zip Ninja-d709a37d14dd37610eea32991c6df8a1a62a25ee.tar.gz Ninja-d709a37d14dd37610eea32991c6df8a1a62a25ee.tar.bz2 |
Suppress MSVC warnings
* D9025: overriding '/GR' with '/GR-'
* C4100: 'argc': unreferenced formal parameter
* C4244: '=': conversion from 'int' to 'char', possible loss of data (on tolower)
* C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
* C4702: unreachable code (after Fatal)
* C4706: assignment within conditional expression
* C4996: 'strcpy': This function or variable may be unsafe
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e02849d..d772e15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,9 @@ endif() # --- compiler flags if(MSVC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") - string(APPEND CMAKE_CXX_FLAGS " /W4 /GR- /Zc:__cplusplus") + string(REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + string(APPEND CMAKE_CXX_FLAGS " /W4 /wd4100 /wd4267 /wd4706 /wd4702 /wd4244 /GR- /Zc:__cplusplus") + add_definitions(-D_CRT_SECURE_NO_WARNINGS) else() include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wno-deprecated flag_no_deprecated) |