From 824f629fd56f34c3a28ebef3a497c4e7aa1d2886 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Thu, 28 Jul 2022 21:55:40 +0200 Subject: [PATCH] Disable exceptions on ICPC --- tests/CMakeLists.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 64e8274692..6a5903730b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -78,13 +78,18 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") endif() # disable exceptions for test-disabled_exceptions -json_test_set_test_options(test-disabled_exceptions COMPILE_DEFINITIONS JSON_NOEXCEPTION) -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - json_test_set_test_options(test-disabled_exceptions COMPILE_OPTIONS -fno-exceptions) -elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # disabled due to https://github.com/nlohmann/json/discussions/2824 - #json_test_set_test_options(test-disabled_exceptions COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0 COMPILE_OPTIONS /EH) -endif() +json_test_set_test_options(test-disabled_exceptions + COMPILE_DEFINITIONS + JSON_NOEXCEPTION + # disabled due to https://github.com/nlohmann/json/discussions/2824 + #$<$:_HAS_EXCEPTIONS=0> + COMPILE_OPTIONS + $<$:-fno-exceptions> $<$:-fno-exceptions> + $<$:-fno-exceptions> + $<$:-fno-exceptions> $<$:-fno-exceptions> + # disabled due to https://github.com/nlohmann/json/discussions/2824 + #$<$:/EH> +) # raise timeout of expensive Unicode test json_test_set_test_options(test-unicode4 TEST_PROPERTIES TIMEOUT 3000)