File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -223,11 +223,20 @@ endif()
223223
224224if (UNITS_BUILD_CXX_MODULE)
225225 add_library (module )
226- target_link_libraries (module PUBLIC ${UNITS_LC_PROJECT_NAME} ::units )
226+ target_link_libraries (
227+ module PUBLIC ${UNITS_LC_PROJECT_NAME} ::units PRIVATE compile_flags_target
228+ )
227229 target_compile_features (module PUBLIC cxx_std_20 )
228230 set_target_properties (
229231 module PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD} CXX_STANDARD_REQUIRED ON
230232 )
233+ if (CMAKE_CXX_STANDARD GREATER 19)
234+ if (MSVC )
235+ target_compile_options (module PUBLIC /Zc:char8_t- )
236+ else ()
237+ target_compile_options (module PUBLIC -fno-char8_t )
238+ endif ()
239+ endif ()
231240 target_sources (
232241 module PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES ${units_module_files}
233242 )
You can’t perform that action at this time.
0 commit comments