From 505c9cc8f539d88e56d7b99fcebeb333deb9a2bb Mon Sep 17 00:00:00 2001 From: Clownacy <Clownacy@users.noreply.github.com> Date: Sat, 14 Mar 2020 19:30:57 +0000 Subject: [PATCH] Clean-up MSVC tweaks --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 824b13e3..06348895 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -383,11 +383,13 @@ endif() # Make some tweaks if we're using MSVC if(MSVC) - target_compile_definitions(CSE2 PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable warnings that normally fire up on MSVC when using "unsafe" functions instead of using MSVC's "safe" _s functions + # Disable warnings that normally fire up on MSVC when using "unsafe" functions instead of using MSVC's "safe" _s functions + target_compile_definitions(CSE2 PRIVATE _CRT_SECURE_NO_WARNINGS) + + # Make it so source files are recognized as UTF-8 by MSVC + target_compile_options(CSE2 PRIVATE "/utf-8") endif() -# Make it so source files are recognized as UTF-8 by MSVC -add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") # Build bin2h externally, so it isn't cross-compiled when CSE2 is (Emscripten, cross-GCC, MinGW on Linux, etc.) include(ExternalProject)