diff options
author | idontgetoutmuch <dominic@steinitz.org> | 2019-07-01 11:28:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-01 11:28:09 +0100 |
commit | d844a145f2e8808c9f75cd99c673d5f5c8960bf2 (patch) | |
tree | bd793f3556be06624df1043d64f5562be20fcc5f /packages/base/hmatrix.cabal | |
parent | 03f114e2d849bbffac89e535c7736ebe7e4d1762 (diff) | |
parent | e6914acb75514fbb2bd2e736c4157e38abdb1ec0 (diff) |
Allow disabling random_r() usage manually.
Diffstat (limited to 'packages/base/hmatrix.cabal')
-rw-r--r-- | packages/base/hmatrix.cabal | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 76e3825..4dc62e5 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal | |||
@@ -36,6 +36,11 @@ flag disable-default-paths | |||
36 | default: False | 36 | default: False |
37 | manual: True | 37 | manual: True |
38 | 38 | ||
39 | flag no-random_r | ||
40 | description: When enabled, don't depend on the random_r() C function. | ||
41 | default: False | ||
42 | manual: True | ||
43 | |||
39 | library | 44 | library |
40 | 45 | ||
41 | Build-Depends: base >= 4.9 && < 5, | 46 | Build-Depends: base >= 4.9 && < 5, |
@@ -99,6 +104,9 @@ library | |||
99 | cc-options: -msse2 | 104 | cc-options: -msse2 |
100 | 105 | ||
101 | 106 | ||
107 | if flag(no-random_r) | ||
108 | cc-options: -DNO_RANDOM_R | ||
109 | |||
102 | if os(OSX) | 110 | if os(OSX) |
103 | if flag(openblas) | 111 | if flag(openblas) |
104 | if !flag(disable-default-paths) | 112 | if !flag(disable-default-paths) |