-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c99b978
commit b21f586
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
recipes/armadillo/all/patches/0004-Guard-dependency-discovery-12.6.x.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
From d227c6242e8022f7a87d0834dba9e65246e8d720 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Dowling <samuel.dowling@protonmail.com> | ||
Date: Thu, 30 Sep 2021 23:51:35 +0930 | ||
Subject: [PATCH] Guard dependency discovery | ||
|
||
* Add guards to prevent usage of custom cmake find package scripts. | ||
--- | ||
CMakeLists.txt | 76 ++++++++++++++++++++++++++++++++++++++++---------- | ||
1 file changed, 61 insertions(+), 15 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index a67ef80..91ef979 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -259,7 +259,11 @@ if(APPLE) | ||
set(ARMA_USE_ACCELERATE true) | ||
|
||
if(ALLOW_OPENBLAS_MACOS) | ||
- include(ARMA_FindOpenBLAS) | ||
+ if(USE_OPENBLAS) | ||
+ find_package(OpenBLAS) | ||
+ else() | ||
+ set(OpenBLAS_FOUND NO) | ||
+ endif() | ||
message(STATUS "OpenBLAS_FOUND = ${OpenBLAS_FOUND}") | ||
message(STATUS "") | ||
message(STATUS "*** If use of OpenBLAS is causing problems,") | ||
@@ -274,8 +278,16 @@ if(APPLE) | ||
endif() | ||
|
||
if(ALLOW_BLAS_LAPACK_MACOS) | ||
- include(ARMA_FindBLAS) | ||
- include(ARMA_FindLAPACK) | ||
+ if(USE_SYSTEM_BLAS) | ||
+ include(ARMA_FindBLAS) | ||
+ else() | ||
+ set(BLAS_FOUND NO) | ||
+ endif() | ||
+ if(USE_SYSTEM_LAPACK) | ||
+ include(ARMA_FindLAPACK) | ||
+ else() | ||
+ set(LAPACK_FOUND NO) | ||
+ endif() | ||
message(STATUS " BLAS_FOUND = ${BLAS_FOUND}" ) | ||
message(STATUS "LAPACK_FOUND = ${LAPACK_FOUND}") | ||
message(STATUS "") | ||
@@ -314,19 +326,45 @@ if(APPLE) | ||
|
||
else() | ||
|
||
- if(ALLOW_FLEXIBLAS_LINUX AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux")) | ||
- include(ARMA_FindFlexiBLAS) | ||
+ if(USE_MKL) | ||
+ find_package(MKL) | ||
else() | ||
- set(FlexiBLAS_FOUND false) | ||
+ set(MKL_FOUND NO) | ||
+ endif() | ||
+ | ||
+ if(USE_OPENBLAS) | ||
+ find_package(OpenBLAS) | ||
+ else() | ||
+ set(OpenBLAS_FOUND NO) | ||
+ endif() | ||
+ | ||
+ if(USE_SYSTEM_ATLAS) | ||
+ include(ARMA_FindATLAS) | ||
+ else() | ||
+ set(ATLAS_FOUND NO) | ||
+ endif() | ||
+ | ||
+ if(USE_SYSTEM_BLAS) | ||
+ include(ARMA_FindBLAS) | ||
+ else() | ||
+ set(BLAS_FOUND NO) | ||
+ endif() | ||
+ | ||
+ if(USE_SYSTEM_LAPACK) | ||
+ include(ARMA_FindLAPACK) | ||
+ else() | ||
+ set(LAPACK_FOUND NO) | ||
endif() | ||
|
||
- include(ARMA_FindMKL) | ||
- include(ARMA_FindOpenBLAS) | ||
- include(ARMA_FindATLAS) # TODO: remove support for ATLAS in next major version | ||
- include(ARMA_FindBLAS) | ||
- include(ARMA_FindLAPACK) | ||
- | ||
- message(STATUS "FlexiBLAS_FOUND = ${FlexiBLAS_FOUND}" ) | ||
+ if(ALLOW_FLEXIBLAS_LINUX AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux")) | ||
+ if(USE_SYSTEM_FLEXIBLAS) | ||
+ include(ARMA_FindFlexiBLAS) | ||
+ else() | ||
+ set(FlexiBLAS_FOUND NO) | ||
+ endif() | ||
+ endif() | ||
+ | ||
+ message(STATUS "FlexiBLAS_FOUND = ${FlexiBLAS_FOUND}" ) | ||
message(STATUS " MKL_FOUND = ${MKL_FOUND}" ) | ||
message(STATUS " OpenBLAS_FOUND = ${OpenBLAS_FOUND}" ) | ||
message(STATUS " ATLAS_FOUND = ${ATLAS_FOUND}" ) | ||
@@ -438,7 +476,11 @@ else() | ||
endif() | ||
|
||
|
||
-include(ARMA_FindARPACK) | ||
+if(USE_SYSTEM_ARPACK) | ||
+ include(ARMA_FindARPACK) | ||
+else() | ||
+ set(ARPACK_FOUND NO) | ||
+endif() | ||
message(STATUS "ARPACK_FOUND = ${ARPACK_FOUND}") | ||
|
||
if(ARPACK_FOUND) | ||
@@ -446,7 +488,11 @@ if(ARPACK_FOUND) | ||
set(ARMA_LIBS ${ARMA_LIBS} ${ARPACK_LIBRARY}) | ||
endif() | ||
|
||
-include(ARMA_FindSuperLU5) | ||
+if(USE_SYSTEM_SUPERLU) | ||
+ include(ARMA_FindSuperLU5) | ||
+else() | ||
+ set(SuperLU_FOUND NO) | ||
+endif() | ||
message(STATUS "SuperLU_FOUND = ${SuperLU_FOUND}") | ||
|
||
if(SuperLU_FOUND) | ||
-- | ||
2.42.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ versions: | |
folder: all | ||
"12.2.0": | ||
folder: all | ||
"12.6.4": | ||
folder: all |