@@ -2,18 +2,10 @@ include("../common.jl")
22
33name = " SuiteSparse"
44
5- sources = [
6- sources;
7- DirectorySource (" ./bundled" )
8- ]
9-
105# Bash recipe for building across all platforms
116script = raw """
127cd $WORKSPACE/srcdir/SuiteSparse
138
14- # Apply Jameson's shlib patch
15- atomic_patch -p1 ${WORKSPACE}/srcdir/patches/SuiteSparse-shlib.patch
16-
179# Disable OpenMP as it will probably interfere with blas threads and Julia threads
1810FLAGS+=(INSTALL="${prefix}" INSTALL_LIB="${libdir}" INSTALL_INCLUDE="${prefix}/include" CFOPENMP=)
1911
@@ -22,34 +14,26 @@ if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
2214 cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
2315fi
2416
25- if [[ ${target} == *mingw32* ]]; then
26- FLAGS+=(UNAME=Windows)
27- FLAGS+=(LDFLAGS="${LDFLAGS} -L${libdir} -shared")
28- else
29- FLAGS+=(UNAME="$(uname)")
30- FLAGS+=(LDFLAGS="${LDFLAGS} -L${libdir}")
31- fi
32-
33- if [[ "${target}" == *-mingw* ]]; then
34- BLAS_NAME=blastrampoline-5
35- else
36- BLAS_NAME=blastrampoline
37- fi
38- if [[ ${nbits} == 64 ]]; then
39- SUN="-DSUN64 -DLONGBLAS='long long'"
40- fi
41-
42- FLAGS+=(BLAS="-l${BLAS_NAME}" LAPACK="-l${BLAS_NAME}")
43-
44- # Disable METIS in CHOLMOD by passing -DNPARTITION and avoiding linking metis
45- #FLAGS+=(MY_METIS_LIB="-lmetis" MY_METIS_INC="${prefix}/include")
46- FLAGS+=(UMFPACK_CONFIG="$SUN" CHOLMOD_CONFIG+="$SUN -DNPARTITION" SPQR_CONFIG="$SUN")
47-
48- make -j${nproc} -C SuiteSparse_config "${FLAGS[@]}" library config
49-
5017for proj in SuiteSparse_config AMD BTF CAMD CCOLAMD COLAMD CHOLMOD LDL KLU UMFPACK RBio SPQR; do
51- make -j${nproc} -C $proj "${FLAGS[@]}" library CFOPENMP="$CFOPENMP"
52- make -j${nproc} -C $proj "${FLAGS[@]}" install CFOPENMP="$CFOPENMP"
18+ cd ${proj}/build
19+ cmake .. -DCMAKE_BUILD_TYPE=Release \
20+ -DCMAKE_INSTALL_PREFIX=${prefix} \
21+ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
22+ -DNOPENMP=ON \
23+ -DNPARTITION=ON \
24+ -DALLOW_64BIT_BLAS=ON \
25+ -DBLAS_FOUND=1 \
26+ -DBLAS_LIBRARIES="${libdir}/libblastrampoline.${dlext}" \
27+ -DBLAS_LINKER_FLAGS="blastrampoline" \
28+ -DBLAS_UNDERSCORE=ON \
29+ -DBLAS64_SUFFIX="_64" \
30+ -DBLA_VENDOR="${BLAS_NAME}" \
31+ -DLAPACK_FOUND=1 \
32+ -DLAPACK_LINKER_FLAGS="blastrampoline" \
33+ -DLAPACK_LIBRARIES="${libdir}/libblastrampoline.${dlext}" \
34+ -DCMAKE_Fortran_COMPILER=""
35+ make -j${nproc}
36+ make install
5337done
5438
5539# For now, we'll have to adjust the name of the Lbt library on macOS and FreeBSD.
0 commit comments