From 36540c773f6833696bae3364c39217847fc5f96b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 1 May 2017 11:58:23 +0200 Subject: cmake/msvc: always pass -source-charset The toolchain file isn't always used. --- cmake/msvc.cmake | 5 ++--- cmake/opentrack-platform.cmake | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index b5d4b468..b32f02d7 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -17,8 +17,7 @@ set(cc "/O2it /Ob2 /fp:fast /GS- /GF /GL /Gw /Gy") set(warns_ "") #C4244: 'return': conversion from '__int64' to 'long', possible loss of data -#C4828: The file contains a character starting at offset 0x2763 that is illegal in the current source character set (codepage 65001). -set(warns-disable 4530 4577 4789 4244 4828) +set(warns-disable 4530 4577 4789 4244) foreach(i ${warns-disable}) set(warns_ "${warns_} /wd${i}") @@ -44,7 +43,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "opentrack") set(cc "${cc} /GR- /arch:SSE2") endif() -set(silly "${warns_} /MT /Zi /Gm -source-charset:UTF-8") +set(silly "${warns_} /MT /Zi /Gm") set(_CFLAGS "${silly}") set(_CXXFLAGS "${silly}") diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index ab3a5f8b..05566237 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -49,6 +49,9 @@ if(MSVC) foreach (i SHARED MODULE EXE) set(CMAKE_${i}_LINKER_FLAGS "-DYNAMICBASE -NXCOMPAT ${CMAKE_${i}_LINKER_FLAGS} ") endforeach() + + #C4828: The file contains a character starting at offset 0x2763 that is illegal in the current source character set (codepage 65001). + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -source-charset:UTF-8 -wd4828") endif() if(WIN32) -- cgit v1.2.3