From 7a950e028c32cb694818cabae3a12137015f2224 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 1 Nov 2024 15:18:44 +0200 Subject: [PATCH] add /utf-8 flag for msvc --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94d43c9d..310ab61d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,9 +33,9 @@ elseif(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() -# make sure __cplusplus is defined when using msvc and enable parallel build +# under msvc make sure __cplusplus, parallel build and utf-8 enabled if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP") + string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP /utf-8") endif() set(CMAKE_CXX_EXTENSIONS OFF)