Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Force MSVC to use utf-8

Commit
b5ef68b044466156a8319a656f23518b34768379
Author
Martin Hořeňovský ·
Parents
681f5daa135c

Files · Download .tar.gz

Changes

 CMakeLists.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3579f0af..8aa47635 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -330,16 +330,15 @@ if (BUILD_TESTING AND NOT_SUBPROJECT)
         coverage_evaluate()
     endif()
 
-    # Add desired warnings
+    # Add per compiler options
     if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
         target_compile_options( SelfTest PRIVATE -Wall -Wextra -Wunreachable-code -Wpedantic)
         if (CATCH_ENABLE_WERROR)
             target_compile_options( SelfTest PRIVATE -Werror)
         endif()
     endif()
-    # Clang specific warning go here
+    # Clang specific options go here
     if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
-        # Actually keep these
         target_compile_options( SelfTest PRIVATE -Wweak-vtables -Wexit-time-destructors -Wglobal-constructors -Wmissing-noreturn )
     endif()
     if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
@@ -348,6 +347,8 @@ if (BUILD_TESTING AND NOT_SUBPROJECT)
         if (CATCH_ENABLE_WERROR)
             target_compile_options( SelfTest PRIVATE /WX)
         endif()
+        # Force MSVC to consider everything as encoded in utf-8
+        target_compile_options( SelfTest PRIVATE /utf-8 )
     endif()