Skip to content

Commit fbd4ccb

Browse files
committed
cmake: drop generator expressions for MSVC /utf-8 option
Replace the MSVC-only generator-expression compile options with a plain `/utf-8` option in the existing MSVC branch. see issue externpro/fmt#35
1 parent b513b37 commit fbd4ccb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,10 @@ if(MSVC)
302302
# fmtlib requires the /utf-8 flag when building with msvc. see https://github.com/fmtlib/fmt/pull/4159 on the
303303
# purpose of the additional
304304
# "$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>"
305-
target_compile_options(spdlog PUBLIC $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
306-
target_compile_options(spdlog_header_only
307-
INTERFACE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
305+
# which has been removed because generator expressions aren't supported by CPS
306+
# see fmt issue https://github.com/externpro/fmt/issues/35 for explanation
307+
target_compile_options(spdlog PUBLIC /utf-8)
308+
target_compile_options(spdlog_header_only INTERFACE /utf-8)
308309
endif()
309310
endif()
310311

0 commit comments

Comments
 (0)