diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-11-23 16:26:46 +0100 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-11-23 16:26:46 +0100 |
commit | ebba19f190e629adf71f0baeb67de8d8e2bb8f98 (patch) | |
tree | 5b89a65eaaa9571e7353a9ed233e32cd6a838504 | |
parent | 44555bfc9385a168e11bfeefe64770e42eb083a7 (diff) | |
parent | 3c434f77c0af4573f8649f0a0da0859ae3deceaa (diff) |
Merge pull request #96 from jshahbazi/patch-1
Add openblas flag and if/else for extra-libraries
-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/ |