Skip to content

Commit

Permalink
[CUTEst] Upgrade to v2.2.3 (#9306)
Browse files Browse the repository at this point in the history
* [CUTEst] Upgrade to v2.2.3

* Quadruple precision is not supported by ARM platforms
  • Loading branch information
amontoison authored Aug 24, 2024
1 parent a698c75 commit e670c14
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions C/CUTEst/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,35 @@
using BinaryBuilder, Pkg

name = "CUTEst"
version = v"2.2.2"
version = v"2.2.3"

# Collection of sources required to build CUTEst
sources = [
GitSource("https://github.com/ralna/CUTEst.git", "11aa6742d633ba0877cb496a26b15c18574a3009"),
GitSource("https://github.com/ralna/CUTEst.git", "074fb7b577f36b7cc91a83dcbfe6b9d809c276a3"),
]

# Bash recipe for building across all platforms
script = raw"""
# Update Ninja
cp ${host_prefix}/bin/ninja /usr/bin/ninja
QUADRUPLE="true"
if [[ "${target}" == *arm* ]]; then
QUADRUPLE="false"
fi
cd ${WORKSPACE}/srcdir/CUTEst
meson setup builddir --cross-file=${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson \
--prefix=$prefix \
-Dquadruple=true
-Dquadruple=${QUADRUPLE}
meson compile -C builddir
meson install -C builddir
# meson setup builddir_shared --cross-file=${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson \
# --prefix=$prefix \
# -Dquadruple=true \
# -Dquadruple=${QUADRUPLE} \
# -Ddefault_library=shared
# meson compile -C builddir_shared
Expand All @@ -43,7 +48,9 @@ if [[ "${target}" != *mingw* ]]; then
cd $libdir
gfortran -fPIC -shared ${extra} $(flagon -Wl,--whole-archive) libcutest_single.a $(flagon -Wl,--no-whole-archive) -o libcutest_single.${dlext}
gfortran -fPIC -shared ${extra} $(flagon -Wl,--whole-archive) libcutest_double.a $(flagon -Wl,--no-whole-archive) -o libcutest_double.${dlext}
gfortran -fPIC -shared ${extra} $(flagon -Wl,--whole-archive) libcutest_quadruple.a $(flagon -Wl,--no-whole-archive) -o libcutest_quadruple.${dlext}
if [[ "${target}" != *arm* ]]; then
gfortran -fPIC -shared ${extra} $(flagon -Wl,--whole-archive) libcutest_quadruple.a $(flagon -Wl,--no-whole-archive) -o libcutest_quadruple.${dlext}
fi
fi
"""

Expand All @@ -56,7 +63,7 @@ platforms = filter(p -> libgfortran_version(p) != v"3", platforms)
products = [
FileProduct("lib/libcutest_single.a", :libcutest_single_a),
FileProduct("lib/libcutest_double.a", :libcutest_double_a),
FileProduct("lib/libcutest_quadruple.a", :libcutest_quadruple_a),
# FileProduct("lib/libcutest_quadruple.a", :libcutest_quadruple_a),
# LibraryProduct("libcutest_single", :libcutest_single),
# LibraryProduct("libcutest_double", :libcutest_double),
# LibraryProduct("libcutest_quadruple", :libcutest_quadruple),
Expand Down

0 comments on commit e670c14

Please sign in to comment.