Skip to content

Commit 4bbefc9

Browse files
only use BinaryProvider if building from source
1 parent 29432fd commit 4bbefc9

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

deps/build.jl

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
using BinaryProvider
2-
import Libdl
1+
if get(ENV, "FT_BUILD_FROM_SOURCE", "false") == "true"
2+
using BinaryProvider
3+
import Libdl
34

4-
const extension = Sys.isapple() ? "dylib" : Sys.islinux() ? "so" : Sys.iswindows() ? "dll" : ""
5+
const extension = Sys.isapple() ? "dylib" : Sys.islinux() ? "so" : Sys.iswindows() ? "dll" : ""
56

6-
print_error() = error(
7-
"FastTransforms could not be properly installed.\n Please check that you have all dependencies installed. " *
8-
"Sample installation of dependencies:\n" *
9-
print_platform_error(platform_key_abi())
10-
)
7+
print_error() = error(
8+
"FastTransforms could not be properly installed.\n Please check that you have all dependencies installed. " *
9+
"Sample installation of dependencies:\n" *
10+
print_platform_error(platform_key_abi())
11+
)
1112

12-
print_platform_error(p::Platform) = "On $(BinaryProvider.platform_name(p)), please consider opening a pull request to add support to build from source.\n"
13-
print_platform_error(p::MacOS) = "On MacOS\n\tbrew install libomp fftw mpfr\n"
14-
print_platform_error(p::Linux) = "On Linux\n\tsudo apt-get install libomp-dev libblas-dev libopenblas-base libfftw3-dev libmpfr-dev\n"
15-
print_platform_error(p::Windows) = "On Windows\n\tvcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpir:x64-windows mpfr:x64-windows\n"
13+
print_platform_error(p::Platform) = "On $(BinaryProvider.platform_name(p)), please consider opening a pull request to add support to build from source.\n"
14+
print_platform_error(p::MacOS) = "On MacOS\n\tbrew install libomp fftw mpfr\n"
15+
print_platform_error(p::Linux) = "On Linux\n\tsudo apt-get install libomp-dev libblas-dev libopenblas-base libfftw3-dev libmpfr-dev\n"
16+
print_platform_error(p::Windows) = "On Windows\n\tvcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpir:x64-windows mpfr:x64-windows\n"
1617

17-
ft_build_from_source = get(ENV, "FT_BUILD_FROM_SOURCE", "false")
18-
if ft_build_from_source == "true"
1918
make = Sys.iswindows() ? "mingw32-make" : "make"
2019
flags = Sys.isapple() ? "FT_USE_APPLEBLAS=1" : Sys.iswindows() ? "FT_FFTW_WITH_COMBINED_THREADS=1" : ""
2120
script = """

0 commit comments

Comments
 (0)