summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2020-12-05 22:41:02 (GMT)
committerGitHub <noreply@github.com>2020-12-05 22:41:02 (GMT)
commit7705fedfaf89907448b089ded209b79cc3347f5d (patch)
treea2a6816bec0d5af7f378cb27ae9704f08bcd2c1b /CMakeLists.txt
parent160531764cd04be7327ae99d4d703e14fc8ead47 (diff)
parentd709a37d14dd37610eea32991c6df8a1a62a25ee (diff)
downloadNinja-7705fedfaf89907448b089ded209b79cc3347f5d.zip
Ninja-7705fedfaf89907448b089ded209b79cc3347f5d.tar.gz
Ninja-7705fedfaf89907448b089ded209b79cc3347f5d.tar.bz2
Merge pull request #1876 from orgads/msvc-warnings
Suppress MSVC warnings
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f03c35..3e4bafa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,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)