Skip to content

Commit 109a6f8

Browse files
Regain Windows support (#88)
* will it work? * fine, i shall specify a platform * ignore deps for a sec, can windows run bash? * remove '/bin/' * same syntax as in if * it's gonna work, you're gonna get exposure! * is the error correct? * actually need to confirm the error * classic typo
1 parent 33b68b0 commit 109a6f8

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

appveyor.yml renamed to .appveyor.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Documentation: http://www.appveyor.com/docs/appveyor-yml/
2+
image: Visual Studio 2017
3+
4+
cache: c:\tools\vcpkg\installed\
5+
6+
platform: x64
7+
18
environment:
29
matrix:
310
- julia_version: 1.0
@@ -6,10 +13,6 @@ environment:
613
- julia_version: 1.3
714
- julia_version: nightly
815

9-
platform:
10-
- x86 # 32-bit
11-
- x64 # 64-bit
12-
1316
# # Uncomment the following lines to allow failures on nightly julia
1417
# # (tests will run but not make your overall status red)
1518
matrix:
@@ -29,6 +32,10 @@ notifications:
2932

3033
install:
3134
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
35+
- set PATH=%PATH%;c:\tools\vcpkg
36+
- set PATH=%PATH%;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin\
37+
- vcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpfr:x64-windows mpir:x64-windows --recurse
38+
- set PATH=c:\tools\vcpkg\installed\x64-windows\bin;%PATH%
3239

3340
build_script:
3441
- echo "%JL_BUILD_SCRIPT%"

deps/build.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using BinaryProvider
22
import Libdl
33

4-
version = v"0.2.8"
4+
version = v"0.2.9"
55

66
if arch(platform_key_abi()) != :x86_64
77
@warn "FastTransforms has only been tested on x86_64 architectures."
@@ -16,18 +16,19 @@ print_error() = error(
1616
)
1717

1818
print_platform_error(p::Platform) = "On $(BinaryProvider.platform_name(p)), please consider opening a pull request to add support.\n"
19-
print_platform_error(::MacOS) = "On MacOS\n\tbrew install gcc@8 fftw mpfr\n"
20-
print_plaftorm_error(::Linux) = "On Linux\n\tsudo apt-get install gcc-8 libblas-dev libopenblas-base libfftw3-dev libmpfr-dev\n"
21-
print_plaftorm_error(::Windows) = "On Windows\n\tvcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpir:x64-windows mpfr:x64-windows\n"
19+
print_platform_error(p::MacOS) = "On MacOS\n\tbrew install gcc@8 fftw mpfr\n"
20+
print_platform_error(p::Linux) = "On Linux\n\tsudo apt-get install gcc-8 libblas-dev libopenblas-base libfftw3-dev libmpfr-dev\n"
21+
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"
2222

2323
# Rationale is as follows: The build is pretty fast, so on Linux it is typically easiest
2424
# to just use the gcc of the system to build the library and include it. On MacOS, however,
2525
# we need to actually install a gcc first, because Apple's OS comes only shipped with clang,
2626
# so here we download the binary.
2727
ft_build_from_source = get(ENV, "FT_BUILD_FROM_SOURCE", Sys.isapple() ? "false" : "true")
2828
if ft_build_from_source == "true"
29-
extra = Sys.isapple() ? "FT_USE_APPLEBLAS=1" : Sys.iswindows() ? "FT_FFTW_WITH_COMBINED_THREADS=1" : ""
29+
make = Sys.iswindows() ? "mingw32-make" : "make"
3030
compiler = Sys.isapple() ? "CC=gcc-8" : "CC=gcc"
31+
flags = Sys.isapple() ? "FT_USE_APPLEBLAS=1" : Sys.iswindows() ? "FT_FFTW_WITH_COMBINED_THREADS=1" : ""
3132
script = """
3233
set -e
3334
set -x
@@ -40,12 +41,12 @@ if ft_build_from_source == "true"
4041
git clone -b v$version https://github.com/MikaelSlevinsky/FastTransforms.git FastTransforms
4142
fi
4243
cd FastTransforms
43-
make lib $compiler $extra
44+
$make lib $compiler $flags
4445
cd ..
4546
mv -f FastTransforms/libfasttransforms.$extension libfasttransforms.$extension
4647
"""
4748
try
48-
run(`/bin/bash -c $(script)`)
49+
run(`bash -c $(script)`)
4950
catch
5051
print_error()
5152
end

0 commit comments

Comments
 (0)