Skip to content

Commit

Permalink
[armadillo] Add version 12.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-emrys committed Sep 17, 2023
1 parent c99b978 commit b21f586
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 0 deletions.
7 changes: 7 additions & 0 deletions recipes/armadillo/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ sources:
"12.2.0":
url: "https://sourceforge.net/projects/arma/files/armadillo-12.2.0.tar.xz"
sha256: "b0dce042297e865add3351dad77f78c2c7638d6632f58357b015e50edcbd2186"
"12.6.4":
url: "https://sourceforge.net/projects/arma/files/armadillo-12.6.4.tar.xz"
sha256: "eb7f243ffc32f18324bc7fa978d0358637e7357ca7836bec55b4eb56e9749380"

patches:
"10.7.0":
Expand All @@ -29,3 +32,7 @@ patches:
- patch_file: "patches/0003-Guard-dependency-discovery-12.2.x.patch"
patch_description: "Add find_package statements to inject conan dependencies"
patch_type: "conan"
"12.6.4":
- patch_file: "patches/0004-Guard-dependency-discovery-12.6.x.patch"
patch_description: "Add find_package statements to inject conan dependencies"
patch_type: "conan"
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

2 changes: 2 additions & 0 deletions recipes/armadillo/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ versions:
folder: all
"12.2.0":
folder: all
"12.6.4":
folder: all

0 comments on commit b21f586

Please sign in to comment.