|
| 1 | +# Note that this script can accept some limited command-line arguments, run |
| 2 | +# `julia build_tarballs.jl --help` to see a usage message. |
| 3 | +using BinaryBuilder, Pkg |
| 4 | + |
| 5 | +name = "ginkgo" |
| 6 | +version = v"1.6.0" |
| 7 | + |
| 8 | +# Collection of sources required to complete build |
| 9 | +sources = [ |
| 10 | + GitSource("https://github.com/youwuyou/ginkgo.git", "c4128a21b1114bedfc19153a9508b2bd3b54954f") |
| 11 | +] |
| 12 | + |
| 13 | +# Bash recipe for building across all platforms |
| 14 | +script = raw""" |
| 15 | +cd $WORKSPACE/srcdir/ginkgo/ |
| 16 | +mkdir build && cd build |
| 17 | +cmake \ |
| 18 | + -DCMAKE_INSTALL_PREFIX=${prefix} \ |
| 19 | + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \ |
| 20 | + -DGINKGO_BUILD_TESTS=OFF \ |
| 21 | + -DGINKGO_BUILD_BENCHMARKS=OFF \ |
| 22 | + -DGINKGO_BUILD_EXAMPLES=OFF \ |
| 23 | + -DGINKGO_DOC_GENERATE_EXAMPLES=OFF \ |
| 24 | + -DGINKGO_BUILD_REFERENCE=ON \ |
| 25 | + -DGINKGO_BUILD_OMP=ON \ |
| 26 | + -DGINKGO_BUILD_CUDA=OFF \ |
| 27 | + -DGINKGO_BUILD_HIP=OFF \ |
| 28 | + -DGINKGO_BUILD_SYCL=OFF \ |
| 29 | + -DGINKGO_BUILD_HWLOC=OFF \ |
| 30 | + -DGINKGO_BUILD_MPI=OFF \ |
| 31 | + -G "Ninja" ../ |
| 32 | +ninja -j${nproc} |
| 33 | +ninja install |
| 34 | +""" |
| 35 | + |
| 36 | +# These are the platforms we will build for by default, unless further |
| 37 | +# platforms are passed in on the command line |
| 38 | +platforms = expand_cxxstring_abis(filter!(Sys.islinux, supported_platforms())) |
| 39 | + |
| 40 | +# The products that we will ensure are always built |
| 41 | +products = [ |
| 42 | + LibraryProduct("libginkgo", :libginkgo), |
| 43 | + LibraryProduct("libginkgo_device", :libginkgo_device), |
| 44 | + LibraryProduct("libginkgo_cuda", :libginkgo_cuda), |
| 45 | + LibraryProduct("libginkgo_reference", :libginkgo_reference), |
| 46 | + LibraryProduct("libginkgo_omp", :libginkgo_omp), |
| 47 | + LibraryProduct("libginkgo_dpcpp", :libginkgo_dpcpp), |
| 48 | + LibraryProduct("libginkgo_hip", :libginkgo_hip) |
| 49 | +] |
| 50 | + |
| 51 | +# Dependencies that must be installed before this package can be built |
| 52 | +dependencies = [ |
| 53 | + Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")), |
| 54 | +] |
| 55 | + |
| 56 | +# Build the tarballs, and possibly a `build.jl` as well. |
| 57 | +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version = v"7.1.0") |
0 commit comments