在vs2022,c++17 上编译通过

This commit is contained in:
xglook 2025-12-14 18:02:55 +08:00
commit 10905b90c8
6 changed files with 66 additions and 8 deletions

View file

@ -42,6 +42,19 @@ if(SMP)
add_definitions(-D_GLIBCXX_USE_NANOSLEEP)
endif(SMP)
######################################################################################
### MSVC specific compiler options
######################################################################################
if(MSVC)
# Add /Zc:__cplusplus compiler option to enable correct __cplusplus macro
add_compile_options(/Zc:__cplusplus)
# Add utf8
add_compile_options(/utf-8)
# Add HAVE_UINT32_T=1 preprocessor definition
add_definitions(-DHAVE_UINT32_T=1)
endif(MSVC)
######################################################################################
### 1) Define installation type
######################################################################################