mirror of
https://github.com/nlohmann/json.git
synced 2026-07-02 16:54:19 +00:00
Remove forced /Od flag in MSVC Release build. (#5216)
Add /wd4702 to disable warning C4702: unreachable code in MSVC Release build. Signed-off-by: Richard Musil <risa2000x@gmail.com> Co-authored-by: Richard Musil <risa2000x@gmail.com>
This commit is contained in:
@@ -63,12 +63,12 @@ target_compile_definitions(test_main PUBLIC
|
||||
JSON_TEST_USING_MULTIPLE_HEADERS=$<BOOL:${JSON_MultipleHeaders}>)
|
||||
target_compile_features(test_main PRIVATE cxx_std_11)
|
||||
target_compile_options(test_main PUBLIC
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/EHsc>
|
||||
# MSVC: Force to always compile with W4
|
||||
# Disable warning C4566: character represented by universal-character-name '\uFF01'
|
||||
# cannot be represented in the current code page (1252)
|
||||
# Disable warning C4996: 'nlohmann::basic_json<...>::operator <<': was declared deprecated
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/W4 /wd4566 /wd4996>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/W4;/wd4566;/wd4996;$<$<CONFIG:Release>:/wd4702>>
|
||||
# https://github.com/nlohmann/json/issues/1114
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/bigobj> $<$<BOOL:${MINGW}>:-Wa,-mbig-obj>
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ target_compile_definitions(abi_compat_common INTERFACE
|
||||
JSON_TEST_KEEP_MACROS)
|
||||
target_compile_features(abi_compat_common INTERFACE cxx_std_11)
|
||||
target_compile_options(abi_compat_common INTERFACE
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/EHsc>
|
||||
# MSVC: Force to always compile with W4
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/W4>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/W4;$<$<CONFIG:Release>:/wd4702>>
|
||||
|
||||
# https://github.com/nlohmann/json/pull/3229
|
||||
$<$<CXX_COMPILER_ID:Intel>:-diag-disable=2196>
|
||||
|
||||
Reference in New Issue
Block a user