summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
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)
###################################################################