From 2f98fceb780149f7cd95afdf748f3a74d78144fb Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Fri, 6 Jun 2025 14:24:12 +0200 Subject: [PATCH] OpenBLAS: silence warnings The OpenBLAS build has uncountable many warnings. Disable them as we don't need them. Only errors are really interesting. --- cmake/projects/OpenBLAS/hunter.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/projects/OpenBLAS/hunter.cmake b/cmake/projects/OpenBLAS/hunter.cmake index 89fb5dd6bf..d5c092229c 100644 --- a/cmake/projects/OpenBLAS/hunter.cmake +++ b/cmake/projects/OpenBLAS/hunter.cmake @@ -115,12 +115,21 @@ else() # https://github.com/xianyi/OpenBLAS/releases/tag/v0.3.21 set(_openblas_BUILD_WITHOUT_LAPACK "OFF") endif() + # silence warnings on OpenBLAS build + if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU") + set(_openblas_cflags "CMAKE_C_FLAGS=-w") + elseif(MSVC) + set(_openblas_cflags "CMAKE_C_FLAGS=/W0") + else() + set(_openblas_cflags) + endif() hunter_cmake_args( OpenBLAS CMAKE_ARGS BUILD_TESTING=OFF NOFORTRAN=1 BUILD_WITHOUT_LAPACK=${_openblas_BUILD_WITHOUT_LAPACK} + ${_openblas_cflags} ) hunter_pick_scheme(DEFAULT url_sha1_cmake) set(_openblas_unrelocatable_text_files "")