Add vendor infrastructure
This commit is contained in:
parent
b11b53aca1
commit
50896e3cd0
@ -1,20 +1,23 @@
|
|||||||
AUTOMAKE_OPTIONS = subdir-objects
|
AUTOMAKE_OPTIONS = subdir-objects
|
||||||
include $(top_srcdir)/atrip.mk
|
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@
|
AM_LDFLAGS = @LAPACK_LIBS@ @BLAS_LIBS@
|
||||||
|
|
||||||
bin_PROGRAMS = test_main
|
bin_PROGRAMS = test_main tuples-distribution
|
||||||
test_main_SOURCES = test_main.cxx
|
test_main_SOURCES = test_main.cxx
|
||||||
|
tuples_distribution_SOURCES = tuples-distribution.cxx
|
||||||
|
|
||||||
|
|
||||||
test_main_LDADD = \
|
test_main_LDADD = $(top_builddir)/src/libatrip.a
|
||||||
$(top_builddir)/src/libatrip.a
|
tuples_distribution_LDADD = $(top_builddir)/src/libatrip.a
|
||||||
|
|
||||||
if WITH_BUILD_CTF
|
if WITH_BUILD_CTF
|
||||||
test_main_LDADD += $(CTF_BUILD_PATH)/lib/libctf.a
|
test_main_LDADD += $(CTF_BUILD_PATH)/lib/libctf.a
|
||||||
|
tuples_distribution_LDADD += $(CTF_BUILD_PATH)/lib/libctf.a
|
||||||
else
|
else
|
||||||
test_main_LDADD += @LIBCTF_LD_LIBRARY_PATH@/libctf.a
|
test_main_LDADD += @LIBCTF_LD_LIBRARY_PATH@/libctf.a
|
||||||
|
tuples_distribution_LDADD += @LIBCTF_LD_LIBRARY_PATH@/libctf.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WITH_CUDA
|
if WITH_CUDA
|
||||||
|
|||||||
@ -16,7 +16,7 @@ $(CTF_SRC_PATH)/configure:
|
|||||||
|
|
||||||
# Here make sure that ctf does not builld with CUDA support
|
# Here make sure that ctf does not builld with CUDA support
|
||||||
# since it is broken anyways
|
# since it is broken anyways
|
||||||
#
|
#
|
||||||
# Also we patch the file kernel.h because it mostl
|
# Also we patch the file kernel.h because it mostl
|
||||||
# doesn't work when we try to include ctf in a CUDACC
|
# doesn't work when we try to include ctf in a CUDACC
|
||||||
# compiler code.
|
# compiler code.
|
||||||
|
|||||||
@ -20,6 +20,8 @@ in
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
pkg = myopenblas;
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
myopenblas
|
myopenblas
|
||||||
scalapack
|
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]]
|
// [[file:~/cuda/atrip/atrip.org::*Macros][Macros:2]]
|
||||||
#ifndef LOG
|
#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
|
#endif
|
||||||
// Macros:2 ends here
|
// Macros:2 ends here
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user