From de4160206991947a45ae167c513c0c41d63381d5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 18 Mar 2017 00:22:41 +0100 Subject: cmake/msvc: disable truncation warning --- cmake/msvc.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index dbdfa4db..32e32641 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -16,7 +16,8 @@ set(cc "/O2it /Ob2 /arch:SSE2 /fp:fast /GS- /GF /GL /Gw /Gy") set(warns_ "") -set(warns-disable 4530 4577 4789) +#C4244: 'return': conversion from '__int64' to 'long', possible loss of data +set(warns-disable 4530 4577 4789 4244) foreach(i ${warns-disable}) set(warns_ "${warns_} /wd${i}") @@ -100,7 +101,7 @@ if((CMAKE_GENERATOR STREQUAL "NMake Makefiles") OR (CMAKE_GENERATOR STREQUAL "NM if(CMAKE_PROJECT_NAME STREQUAL "opentrack") set(warn-flag-found FALSE) foreach (i CMAKE_CXX_FLAGS CMAKE_C_FLAGS) - string(REGEX MATCH "((^| )/[W][0-9]( |\$))" ret "${${i}}") + string(REGEX MATCH "((^| )[-/][W][0-9]( |\$))" ret "${${i}}") if(ret STREQUAL "") set(${i} "-W3 ${${i}}" CACHE STRING "" FORCE) endif() -- cgit v1.2.3