diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-01 11:58:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-02 23:19:38 +0200 |
commit | 36540c773f6833696bae3364c39217847fc5f96b (patch) | |
tree | 74ce51f93f7e199753dd9c1e65ae51031b841d21 | |
parent | aaa3a04577a7d4633ef0eb9eb7dc2aa33db0d0eb (diff) |
cmake/msvc: always pass -source-charset
The toolchain file isn't always used.
-rw-r--r-- | cmake/msvc.cmake | 5 | ||||
-rw-r--r-- | 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) |