diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-04-29 13:06:31 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-04-29 13:06:31 -0700 |
commit | 2c25216be692deaeac362fc2e50c1bd29903b217 (patch) | |
tree | e000487c271d7fd5484e5ce0c032771c8c55d54d /CMakeLists.txt | |
parent | d33ba72b2d6eb207e62017cb3c1dfb8618d84f98 (diff) | |
download | tcpdump-2c25216be692deaeac362fc2e50c1bd29903b217.tar.gz |
Add /utf-8 for MSVC.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dddef6a..97c0bfed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,14 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") check_and_add_compiler_option("-c99") endif() +# +# Treat source files as being in UTF-8 with MSVC. +# We assume that UTF-8 source is OK with other compilers. +# +if(MSVC AND NOT ${CMAKE_C_COMPILER} MATCHES "clang*") + set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} /utf-8") +endif(MSVC AND NOT ${CMAKE_C_COMPILER} MATCHES "clang*") + set(LIBRARY_NAME netdissect) ################################################################### |