mirror of
https://github.com/nlohmann/json.git
synced 2025-06-13 03:55:18 +08:00
Disable exceptions on ICPC (#3621)
This commit is contained in:
parent
d909f80960
commit
a2578d1d50
@ -78,13 +78,18 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# disable exceptions for test-disabled_exceptions
|
# disable exceptions for test-disabled_exceptions
|
||||||
json_test_set_test_options(test-disabled_exceptions COMPILE_DEFINITIONS JSON_NOEXCEPTION)
|
json_test_set_test_options(test-disabled_exceptions
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
COMPILE_DEFINITIONS
|
||||||
json_test_set_test_options(test-disabled_exceptions COMPILE_OPTIONS -fno-exceptions)
|
JSON_NOEXCEPTION
|
||||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
# disabled due to https://github.com/nlohmann/json/discussions/2824
|
||||||
# disabled due to https://github.com/nlohmann/json/discussions/2824
|
#$<$<CXX_COMPILER_ID:MSVC>:_HAS_EXCEPTIONS=0>
|
||||||
#json_test_set_test_options(test-disabled_exceptions COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0 COMPILE_OPTIONS /EH)
|
COMPILE_OPTIONS
|
||||||
endif()
|
$<$<CXX_COMPILER_ID:AppleClang>:-fno-exceptions> $<$<CXX_COMPILER_ID:Clang>:-fno-exceptions>
|
||||||
|
$<$<CXX_COMPILER_ID:GNU>:-fno-exceptions>
|
||||||
|
$<$<CXX_COMPILER_ID:Intel>:-fno-exceptions> $<$<CXX_COMPILER_ID:IntelLLVM>:-fno-exceptions>
|
||||||
|
# disabled due to https://github.com/nlohmann/json/discussions/2824
|
||||||
|
#$<$<CXX_COMPILER_ID:MSVC>:/EH>
|
||||||
|
)
|
||||||
|
|
||||||
# raise timeout of expensive Unicode test
|
# raise timeout of expensive Unicode test
|
||||||
json_test_set_test_options(test-unicode4 TEST_PROPERTIES TIMEOUT 3000)
|
json_test_set_test_options(test-unicode4 TEST_PROPERTIES TIMEOUT 3000)
|
||||||
|
Loading…
Reference in New Issue
Block a user