File tree 1 file changed +12
-7
lines changed
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,18 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
78
78
endif ()
79
79
80
80
# disable exceptions for test-disabled_exceptions
81
- json_test_set_test_options(test -disabled_exceptions COMPILE_DEFINITIONS JSON_NOEXCEPTION)
82
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
83
- json_test_set_test_options(test -disabled_exceptions COMPILE_OPTIONS -fno-exceptions)
84
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
85
- # disabled due to https://github.com/nlohmann/json/discussions/2824
86
- #json_test_set_test_options(test-disabled_exceptions COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0 COMPILE_OPTIONS /EH)
87
- endif ()
81
+ json_test_set_test_options(test -disabled_exceptions
82
+ COMPILE_DEFINITIONS
83
+ JSON_NOEXCEPTION
84
+ # disabled due to https://github.com/nlohmann/json/discussions/2824
85
+ #$<$<CXX_COMPILER_ID:MSVC>:_HAS_EXCEPTIONS=0>
86
+ COMPILE_OPTIONS
87
+ $<$<CXX_COMPILER_ID:AppleClang>:-fno-exceptions> $<$<CXX_COMPILER_ID:Clang>:-fno-exceptions>
88
+ $<$<CXX_COMPILER_ID:GNU>:-fno-exceptions>
89
+ $<$<CXX_COMPILER_ID:Intel>:-fno-exceptions> $<$<CXX_COMPILER_ID:IntelLLVM>:-fno-exceptions>
90
+ # disabled due to https://github.com/nlohmann/json/discussions/2824
91
+ #$<$<CXX_COMPILER_ID:MSVC>:/EH>
92
+ )
88
93
89
94
# raise timeout of expensive Unicode test
90
95
json_test_set_test_options(test -unicode4 TEST_PROPERTIES TIMEOUT 3000)
You can’t perform that action at this time.
0 commit comments