diff options
author | John Shahbazian <jshahbazi@hotmail.com> | 2014-11-15 21:43:43 -0500 |
---|---|---|
committer | John Shahbazian <jshahbazi@hotmail.com> | 2014-11-15 21:43:43 -0500 |
commit | 3c434f77c0af4573f8649f0a0da0859ae3deceaa (patch) | |
tree | 5b89a65eaaa9571e7353a9ed233e32cd6a838504 /packages/base/hmatrix.cabal | |
parent | 44555bfc9385a168e11bfeefe64770e42eb083a7 (diff) |
Add openblas flag and if/else for extra-libraries
Adds the openblas flag and the changes to support the libraries. Both blas and lapack are in there, so if its used, then those two shouldn't be included. I have openblas installed in /usr/lib/openblas per recommendation by the developers.
Diffstat (limited to 'packages/base/hmatrix.cabal')
-rw-r--r-- | packages/base/hmatrix.cabal | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index eff9569..3f0b3cc 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal | |||
@@ -32,6 +32,10 @@ extra-source-files: THANKS.md CHANGELOG | |||
32 | 32 | ||
33 | extra-source-files: src/C/lapack-aux.h | 33 | extra-source-files: src/C/lapack-aux.h |
34 | 34 | ||
35 | flag openblas | ||
36 | description: Link with OpenBLAS (https://github.com/xianyi/OpenBLAS) optimized libraries. | ||
37 | default: False | ||
38 | |||
35 | library | 39 | library |
36 | 40 | ||
37 | Build-Depends: base >= 4 && < 5, | 41 | Build-Depends: base >= 4 && < 5, |
@@ -100,7 +104,11 @@ library | |||
100 | 104 | ||
101 | cpp-options: -DBINARY | 105 | cpp-options: -DBINARY |
102 | 106 | ||
103 | extra-libraries: blas lapack | 107 | if flag(openblas) |
108 | extra-lib-dirs: /usr/lib/openblas/lib | ||
109 | extra-libraries: openblas | ||
110 | else | ||
111 | extra-libraries: blas lapack | ||
104 | 112 | ||
105 | if os(OSX) | 113 | if os(OSX) |
106 | extra-lib-dirs: /opt/local/lib/ | 114 | extra-lib-dirs: /opt/local/lib/ |