mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-21 18:20:04 +00:00
fix: pass /utf-8 only if the compiler is MSVC at build time
This commit is contained in:
parent
ab8f9d5b08
commit
f924d16e47
@ -365,8 +365,8 @@ if (NOT MSVC)
|
|||||||
# Unicode is always supported on compilers other than MSVC.
|
# Unicode is always supported on compilers other than MSVC.
|
||||||
elseif (FMT_UNICODE)
|
elseif (FMT_UNICODE)
|
||||||
# Unicode support requires compiling with /utf-8.
|
# Unicode support requires compiling with /utf-8.
|
||||||
target_compile_options(fmt PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/utf-8>)
|
target_compile_options(fmt PUBLIC $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
|
||||||
target_compile_options(fmt-header-only INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/utf-8>)
|
target_compile_options(fmt-header-only INTERFACE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
|
||||||
else ()
|
else ()
|
||||||
target_compile_definitions(fmt PUBLIC FMT_UNICODE=0)
|
target_compile_definitions(fmt PUBLIC FMT_UNICODE=0)
|
||||||
endif ()
|
endif ()
|
||||||
|
Loading…
Reference in New Issue
Block a user