1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# Allow test programs that use OpenMPI to run
export OMPI_MCA_plm_rsh_agent=/bin/false
export OMPI_MCA_rmaps_base_oversubscribe=1
export BUILDDIR = obj-$(DEB_HOST_GNU_TYPE)
%:
dh $@ --buildsystem=cmake
# NOTE: the superlu-dist cmake scripts generate a configuration error:
# CMake Error in SRC/CMakeLists.txt:
# Found relative path while evaluating include directories of "superlu_dist":
# "OFF"
# with error code 1, which causes the build to halt.
# But the configuration seems fine (GNUInstallDirs are used to define standard install dirs).
# For now, work around the error by ignoring it (append "|| /bin/true")
override_dh_auto_configure:
dh_auto_configure -- \
-DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_FORTRAN_COMPILER=mpifort \
-DMPIEXEC_PREFLAGS=--allow-run-as-root \
-DCMAKE_INSTALL_INCLUDEDIR=include/superlu-dist \
-Denable_blaslib=OFF -DTPL_BLAS_LIBRARIES=/usr/lib/$(DEB_HOST_MULTIARCH)/libblas.so \
-DTPL_ENABLE_PARMETISLIB=OFF \
-DTPL_ENABLE_COMBBLASLIB=ON \
-DTPL_COMBBLAS_LIBRARIES="-lCombBLAS -lGraphGenlib -lUsortlib" \
-DTPL_COMBBLAS_INCLUDE_DIRS=/usr/include/CombBLAS/ \
|| /bin/true
# set LD_LIBRARY_PATH to test against the libsuperlu_dist.so just built
override_dh_auto_test:
export LD_LIBRARY_PATH=$(CURDIR)/$(BUILDDIR)/SRC:$${LD_LIBRARY_PATH}; \
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH} dh_auto_test --max-parallel=1 || /bin/true
override_dh_install:
dh_install
for testfile in $$( find debian/libsuperlu-dist-dev -name CTestTestfile.cmake ); do \
sed -r "s|$(CURDIR)|<<builddir>>/superlu-dist|; \
s|(.*)\".*/(EXAMPLE/.*ua)|\1\"/usr/lib/$(DEB_HOST_MULTIARCH)/superlu-dist/tests/\2|" \
-i $$testfile; \
done
|