Add vendor infrastructure
This commit is contained in:
parent
b11b53aca1
commit
50896e3cd0
@ -1,20 +1,23 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
include $(top_srcdir)/atrip.mk
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include/ $(CTF_CPPFLAGS)
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir) $(CTF_CPPFLAGS)
|
||||
AM_LDFLAGS = @LAPACK_LIBS@ @BLAS_LIBS@
|
||||
|
||||
bin_PROGRAMS = test_main
|
||||
bin_PROGRAMS = test_main tuples-distribution
|
||||
test_main_SOURCES = test_main.cxx
|
||||
tuples_distribution_SOURCES = tuples-distribution.cxx
|
||||
|
||||
|
||||
test_main_LDADD = \
|
||||
$(top_builddir)/src/libatrip.a
|
||||
test_main_LDADD = $(top_builddir)/src/libatrip.a
|
||||
tuples_distribution_LDADD = $(top_builddir)/src/libatrip.a
|
||||
|
||||
if WITH_BUILD_CTF
|
||||
test_main_LDADD += $(CTF_BUILD_PATH)/lib/libctf.a
|
||||
tuples_distribution_LDADD += $(CTF_BUILD_PATH)/lib/libctf.a
|
||||
else
|
||||
test_main_LDADD += @LIBCTF_LD_LIBRARY_PATH@/libctf.a
|
||||
tuples_distribution_LDADD += @LIBCTF_LD_LIBRARY_PATH@/libctf.a
|
||||
endif
|
||||
|
||||
if WITH_CUDA
|
||||
|
||||
@ -20,6 +20,8 @@ in
|
||||
|
||||
{
|
||||
|
||||
pkg = myopenblas;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
myopenblas
|
||||
scalapack
|
||||
|
||||
27
etc/nix/vendor-shell.nix
Normal file
27
etc/nix/vendor-shell.nix
Normal file
@ -0,0 +1,27 @@
|
||||
rec {
|
||||
|
||||
directory = "vendor";
|
||||
src = ''
|
||||
|
||||
_add_vendor_cpath () {
|
||||
export CPATH=$CPATH:$1
|
||||
mkdir -p ${directory}/include
|
||||
ln -frs $1/* ${directory}/include/
|
||||
}
|
||||
|
||||
_add_vendor_lib () {
|
||||
mkdir -p ${directory}/lib
|
||||
ln -frs $1/* ${directory}/lib/
|
||||
}
|
||||
|
||||
'';
|
||||
|
||||
cpath = path: ''
|
||||
_add_vendor_cpath ${path}
|
||||
'';
|
||||
|
||||
lib = path: ''
|
||||
_add_vendor_lib ${path}
|
||||
'';
|
||||
|
||||
}
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
// [[file:~/cuda/atrip/atrip.org::*Macros][Macros:2]]
|
||||
#ifndef LOG
|
||||
#define LOG(level, name) if (Atrip::rank == 0) std::cout << name << ": "
|
||||
#define LOG(level, name) if (atrip::Atrip::rank == 0) std::cout << name << ": "
|
||||
#endif
|
||||
// Macros:2 ends here
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user