File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -115,3 +115,8 @@ jobs:
115
115
working-directory : ${{github.workspace}}/build
116
116
shell : bash
117
117
run : if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utf8_test_cpp20
118
+
119
+ - name : Test c++20 no char_t
120
+ working-directory : ${{github.workspace}}/build
121
+ shell : bash
122
+ run : if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utf8_test_cpp20_no_char_t
Original file line number Diff line number Diff line change 23
23
#
24
24
# For more information, please refer to <http://unlicense.org/>
25
25
26
- project (utf8)
27
26
cmake_minimum_required (VERSION 2.8.12)
27
+ project (utf8)
28
28
29
29
set (UTF8_USE_SANITIZER "" CACHE STRING "Set which Clang Sanitizer to use" )
30
30
@@ -95,6 +95,24 @@ add_executable(utf8_test_cpp20 test.cpp)
95
95
add_sanitizer(utf8_test_cpp20)
96
96
set_target_properties (utf8_test_cpp20 PROPERTIES CXX_STANDARD 20)
97
97
98
+ add_executable (utf8_test_cpp20_no_char_t test .cpp)
99
+ add_sanitizer(utf8_test_cpp20_no_char_t)
100
+ set_target_properties (utf8_test_cpp20_no_char_t PROPERTIES CXX_STANDARD 20)
101
+
102
+ if ("${CMAKE_C_COMPILER_ID} " STREQUAL "GNU" )
103
+ target_compile_options (utf8_test_cpp20_no_char_t PUBLIC "-fno-char8_t" )
104
+ elseif ("${CMAKE_C_COMPILER_ID} " STREQUAL "Clang" )
105
+ if ("${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} " STREQUAL "MSVC" )
106
+ target_compile_options (utf8_test_cpp20_no_char_t PUBLIC "/Zc:char8_t-" )
107
+ else ()
108
+ target_compile_options (utf8_test_cpp20_no_char_t PUBLIC "-fno-char8_t" )
109
+ endif ()
110
+ elseif ("${CMAKE_C_COMPILER_ID} " STREQUAL "MSVC" )
111
+ target_compile_options (utf8_test_cpp20_no_char_t PUBLIC "/Zc:char8_t-" )
112
+ else ()
113
+ message (WARNING "Unknown compiler '${CMAKE_C_COMPILER_ID} '!" )
114
+ endif ()
115
+
98
116
if ("${CMAKE_C_COMPILER_ID} " STREQUAL "GNU" )
99
117
set_source_files_properties (test .c test .cpp PROPERTIES
100
118
COMPILE_FLAGS "-Wall -Wextra -Werror"
You can’t perform that action at this time.
0 commit comments