Skip to content

Commit b926b60

Browse files
authored
OpenBLAS: silence warnings (#792)
The OpenBLAS build has uncountable many warnings. Disable them as we don't need them. Only errors are really interesting.
1 parent 4b2738c commit b926b60

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmake/projects/OpenBLAS/hunter.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,21 @@ else()
115115
# https://github.com/xianyi/OpenBLAS/releases/tag/v0.3.21
116116
set(_openblas_BUILD_WITHOUT_LAPACK "OFF")
117117
endif()
118+
# silence warnings on OpenBLAS build
119+
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
120+
set(_openblas_cflags "CMAKE_C_FLAGS=-w")
121+
elseif(MSVC)
122+
set(_openblas_cflags "CMAKE_C_FLAGS=/W0")
123+
else()
124+
set(_openblas_cflags)
125+
endif()
118126
hunter_cmake_args(
119127
OpenBLAS
120128
CMAKE_ARGS
121129
BUILD_TESTING=OFF
122130
NOFORTRAN=1
123131
BUILD_WITHOUT_LAPACK=${_openblas_BUILD_WITHOUT_LAPACK}
132+
${_openblas_cflags}
124133
)
125134
hunter_pick_scheme(DEFAULT url_sha1_cmake)
126135
set(_openblas_unrelocatable_text_files "")

0 commit comments

Comments
 (0)