From 754062365ac68467017963ff24c640e347584f9b Mon Sep 17 00:00:00 2001 From: ChihHao Su Date: Wed, 8 Feb 2023 13:40:15 +0800 Subject: [PATCH 1/2] Disable some tests for a issue of clang on OpenBSD --- test/CMakeLists.txt | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ea7cfec65910..2cc11c41d4b8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -61,12 +61,30 @@ add_fmt_test(chrono-test) add_fmt_test(color-test) add_fmt_test(core-test) add_fmt_test(gtest-extra-test) -add_fmt_test(format-test mock-allocator.h) + +# Workaround of https://github.com/llvm/llvm-project/issues/56694 +# Remove this when the issue is solved! +if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" + AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + message(WARNING "Skipping format-test due a issue of clang on OpenBSD: " + "https://github.com/llvm/llvm-project/issues/56694") +else() + add_fmt_test(format-test mock-allocator.h) +endif() + if (MSVC) target_compile_options(format-test PRIVATE /bigobj) endif () if (NOT (MSVC AND BUILD_SHARED_LIBS)) - add_fmt_test(format-impl-test HEADER_ONLY header-only-test.cc) + # Workaround of https://github.com/llvm/llvm-project/issues/56694 + # Remove this when the issue is solved! + if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" + AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + message(WARNING "Skipping format-impl-test due a issue of clang on OpenBSD: " + "https://github.com/llvm/llvm-project/issues/56694") + else() + add_fmt_test(format-impl-test HEADER_ONLY header-only-test.cc) + endif() endif () add_fmt_test(ostream-test) add_fmt_test(compile-test) From 22e80e4047c722527ba8b8e68a2e19a34c23f515 Mon Sep 17 00:00:00 2001 From: ChihHao Su Date: Wed, 8 Feb 2023 13:57:53 +0800 Subject: [PATCH 2/2] Fix a English grammer mistake --- test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2cc11c41d4b8..890c10dd6935 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -66,7 +66,7 @@ add_fmt_test(gtest-extra-test) # Remove this when the issue is solved! if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") - message(WARNING "Skipping format-test due a issue of clang on OpenBSD: " + message(WARNING "Skipping format-test due to a issue of clang on OpenBSD: " "https://github.com/llvm/llvm-project/issues/56694") else() add_fmt_test(format-test mock-allocator.h) @@ -80,7 +80,7 @@ if (NOT (MSVC AND BUILD_SHARED_LIBS)) # Remove this when the issue is solved! if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") - message(WARNING "Skipping format-impl-test due a issue of clang on OpenBSD: " + message(WARNING "Skipping format-impl-test due to a issue of clang on OpenBSD: " "https://github.com/llvm/llvm-project/issues/56694") else() add_fmt_test(format-impl-test HEADER_ONLY header-only-test.cc)