Skip to content

Commit

Permalink
perf: remove /Zc:preprocessor required for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Feb 3, 2024
1 parent ee39af9 commit 5a5f9bc
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 107 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ option(BUILD_TESTING "Build testing" ON)
set(CMAKE_CXX_STANDARD 17)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
add_compile_options("/utf-8" "/W4" "/Zc:preprocessor")
add_compile_options("/utf-8" "/W4")
else()
add_compile_options("-Wall;-Wextra;-Wpedantic;-mtune=native")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ A modern all-platform Json/Json5 parser/serializer, which is header-only and use
```

- **meojson** 仅依赖 STL, 但需要 c++17 标准
- 若使用 MSVC,请在项目中添加 `/Zc:preprocessor`
- 若使用 AppleClang,请在项目中添加 `-Wno-gnu-zero-variadic-macro-arguments`

## 序列化
Expand Down
1 change: 0 additions & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ A modern all-platform Json/Json5 parser/serializer, which is header-only and use
```

- **meojson** only depends on STL, but requires c++17 standard
- For MSVC, please add `/Zc:preprocessor` to your project
- For AppleClang, please add `-Wno-gnu-zero-variadic-macro-arguments` to your project

## Serializing
Expand Down
Loading

0 comments on commit 5a5f9bc

Please sign in to comment.