From 8456416acc5bbc73e941577e564b3e862f8ef56e Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 19 Mar 2025 12:27:55 +0100 Subject: [PATCH] fix: `Wunused-result` warning disabled for clang-20.1 (compiler bug) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 711136c4..b2a13f18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,3 +84,8 @@ endif() # add unit tests enable_testing() add_subdirectory(test) + +# TODO remove this hack when clang-20.2 is released +if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 20 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20.2) + target_compile_options(mp-units-core PUBLIC "-Wno-unused-result") +endif()