Skip to content

Commit

Permalink
introduce -d:localFftw3 so it is both possible to run CI and produce …
Browse files Browse the repository at this point in the history
…exportable binary
  • Loading branch information
Clonkk committed May 21, 2021
1 parent e3667e3 commit fb659ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: nimble localinstallfftw
env:
LD_LIBRARY_PATH: ${PWD}/third_parth/lib
- run: testament r tests/testall.nim
- run: testament r tests/testall.nim -d:localFftw3
env:
LD_LIBRARY_PATH: ${PWD}/third_parth/lib
- run: nimble gendoc
Expand Down
2 changes: 1 addition & 1 deletion fftw3.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ requires "zippy"

import os
task gendoc, "gen doc":
exec("nimble doc --threads:on --project fftw3.nim --out:docs/")
exec("nimble doc --threads:on --project fftw3.nim -d:localFftw3 --out:docs/")

task installfftw, "Install FFTW-3.3.9":
selfExec("r fftw3/install/fftwinstall.nim")
Expand Down
7 changes: 5 additions & 2 deletions fftw3/libutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ elif defined(macosx):
else:
const Fftw3LibName* = "libfftw3.so.(|3|3.6.9)"

# const Fftw3LibPath = currentSourcePath().parentDir().parentDir() / "third_party" / "lib"
const Fftw3Lib* = Fftw3LibName
when defined(localFftw3):
const Fftw3LibPath = currentSourcePath().parentDir().parentDir() / "third_party" / "lib"
const Fftw3Lib* = Fftw3LibPath / Fftw3LibName
else:
const Fftw3Lib* = Fftw3LibName
# static:
# debugEcho "nim-fftw3> Using dynamic library: ", Fftw3Lib

Expand Down

0 comments on commit fb659ec

Please sign in to comment.