fix: use new way to detect c++ version in MSVC.

- use new macro to check C++ version in MSVC, instead of use compiler switch and __cplusplus macro.
This commit is contained in:
2024-08-15 16:50:15 +08:00
parent f3a88e951c
commit 3858b4f3ec
2 changed files with 5 additions and 7 deletions

View File

@ -72,10 +72,6 @@ PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:_UNICODE>
)
target_compile_options(YYCCommonplace
# Enable new __cplusplus macro in MSVC.
# Because we use it in header, so we need populate it.
PUBLIC
$<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
# Order build as UTF-8 in MSVC
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/utf-8>