diff options
author | Vassil Keremidchiev <varosi@gmail.com> | 2015-09-06 15:59:10 +0300 |
---|---|---|
committer | Vassil Keremidchiev <varosi@gmail.com> | 2015-09-06 15:59:10 +0300 |
commit | fc8bf571052ad6b987ac10582da63fd03c8df85a (patch) | |
tree | 6a0a90d544b68f9471f3bfd952db0ac5dabd7e0e /packages | |
parent | 8398f05c605f2c4481c978047f75b0d0a7e92aa0 (diff) |
Windows build with OpenBLAS
Currently OpenBLAS building on Windows is not working.
1. Under Windows actual name of the library is libopenblas.dll and not openblas.dll
2. There were duplication of external dependencies: blas and lapack. Because extra-libraries was declared twice - for openstack condition and for OS condition.
3. I'm not sure how OpenBLAS is built on other OSes, so someone have to check this change on other OSes.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/base/hmatrix.cabal | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 31bea3e..3a11135 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal | |||
@@ -96,13 +96,13 @@ library | |||
96 | 96 | ||
97 | cpp-options: -DBINARY | 97 | cpp-options: -DBINARY |
98 | 98 | ||
99 | if flag(openblas) | ||
100 | extra-lib-dirs: /usr/lib/openblas/lib | ||
101 | extra-libraries: openblas | ||
102 | else | ||
103 | extra-libraries: blas lapack | ||
104 | |||
105 | if os(OSX) | 99 | if os(OSX) |
100 | if flag(openblas) | ||
101 | extra-lib-dirs: /opt/local/lib/openblas/lib | ||
102 | extra-libraries: openblas | ||
103 | else | ||
104 | extra-libraries: blas lapack | ||
105 | |||
106 | extra-lib-dirs: /opt/local/lib/ | 106 | extra-lib-dirs: /opt/local/lib/ |
107 | include-dirs: /opt/local/include/ | 107 | include-dirs: /opt/local/include/ |
108 | extra-lib-dirs: /usr/local/lib/ | 108 | extra-lib-dirs: /usr/local/lib/ |
@@ -112,14 +112,29 @@ library | |||
112 | frameworks: Accelerate | 112 | frameworks: Accelerate |
113 | 113 | ||
114 | if os(freebsd) | 114 | if os(freebsd) |
115 | if flag(openblas) | ||
116 | extra-lib-dirs: /usr/local/lib/openblas/lib | ||
117 | extra-libraries: openblas | ||
118 | else | ||
119 | extra-libraries: blas lapack | ||
120 | |||
115 | extra-lib-dirs: /usr/local/lib | 121 | extra-lib-dirs: /usr/local/lib |
116 | include-dirs: /usr/local/include | 122 | include-dirs: /usr/local/include |
117 | extra-libraries: blas lapack gfortran | 123 | extra-libraries: gfortran |
118 | 124 | ||
119 | if os(windows) | 125 | if os(windows) |
120 | extra-libraries: blas lapack | 126 | if flag(openblas) |
127 | extra-libraries: libopenblas | ||
128 | else | ||
129 | extra-libraries: blas lapack | ||
121 | 130 | ||
122 | if os(linux) | 131 | if os(linux) |
132 | if flag(openblas) | ||
133 | extra-lib-dirs: /usr/lib/openblas/lib | ||
134 | extra-libraries: openblas | ||
135 | else | ||
136 | extra-libraries: blas lapack | ||
137 | |||
123 | if arch(x86_64) | 138 | if arch(x86_64) |
124 | cc-options: -fPIC | 139 | cc-options: -fPIC |
125 | 140 | ||