diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-06-23 19:02:09 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-06-23 19:02:09 +0000 |
commit | 22a6a1136dbbf0ca37b041b8002e9d86ded7e0a9 (patch) | |
tree | 351027bb4af64c97ef916a90b365861b3e68ebff /cmake | |
parent | 39639d90dfeeac48bdf3c2956f7e1761fc5e455c (diff) |
Default to using the Unicode version of Win32 APIs instead of the ANSI version. This helps to catch instances where a developer accidentally forgets to explicitly specify which version of the API to use and accidentally winds up failing to support non-ASCII characters properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/HandleLLVMOptions.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index d25573304a0..493c1c9eb71 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -249,6 +249,12 @@ if( MSVC ) -D_SCL_SECURE_NO_WARNINGS ) + # Tell MSVC to use the Unicode version of the Win32 APIs instead of ANSI. + add_llvm_definitions( + -DUNICODE + -D_UNICODE + ) + set(msvc_warning_flags # Disabled warnings. -wd4141 # Suppress ''modifier' : used more than once' (because of __forceinline combined with inline) |