File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,8 @@ endif()
148148
149149option (HIPO "Build HIPO" OFF )
150150message (STATUS "Build HIPO: ${HIPO} " )
151+ option (BUILD_OPENBLAS "Build OpenBLAS" ON )
152+ message (STATUS "Build OpenBLAS: ${BUILD_OPENBLAS} " )
151153if (HIPO AND CSHARP)
152154 message (ERROR "HIPO is only available in C++. Not yet supported in C#." )
153155endif ()
Original file line number Diff line number Diff line change 1- # BLAS
1+ # Fetch OpenBLAS
2+ if (BUILD_OPENBLAS)
3+ include (FetchContent)
4+ set (FETCHCONTENT_QUIET OFF )
5+ set (FETCHCONTENT_UPDATES_DISCONNECTED ON )
6+ set (BUILD_SHARED_LIBS ON )
7+ set (CMAKE_POSITION_INDEPENDENT_CODE ON )
8+ set (BUILD_TESTING OFF )
9+ set (CMAKE_Fortran_COMPILER OFF )
10+
11+ message (CHECK_START "Fetching OpenBLAS" )
12+ list (APPEND CMAKE_MESSAGE_INDENT " " )
13+ FetchContent_Declare(
14+ openblas
15+ GIT_REPOSITORY "https://github.com/OpenMathLib/OpenBLAS.git"
16+ GIT_TAG "v0.3.30"
17+ GIT_SHALLOW TRUE
18+ UPDATE_COMMAND git reset --hard
19+ )
20+ FetchContent_MakeAvailable(openblas)
21+ list (POP_BACK CMAKE_MESSAGE_INDENT)
22+ message (CHECK_PASS "fetched" )
23+ endif ()
24+
25+ # Find BLAS
226set (BLAS_ROOT "" CACHE STRING "Root directory of BLAS or OpenBLAS" )
327if (NOT BLAS_ROOT STREQUAL "" )
428 message (STATUS "BLAS_ROOT is " ${BLAS_ROOT} )
You can’t perform that action at this time.
0 commit comments