mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
Eigen support fix (use of Grid as a library was broken)
This commit is contained in:
parent
81347b4d16
commit
584c921ca0
@ -480,8 +480,8 @@ GRID_LIBS=$LIBS
|
||||
GRID_SHORT_SHA=`git rev-parse --short HEAD`
|
||||
GRID_SHA=`git rev-parse HEAD`
|
||||
GRID_BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
AM_CXXFLAGS="-I${abs_srcdir}/include -I${abs_srcdir}/Eigen/ -I${abs_srcdir}/Eigen/unsupported $AM_CXXFLAGS"
|
||||
AM_CFLAGS="-I${abs_srcdir}/include -I${abs_srcdir}/Eigen/ -I${abs_srcdir}/Eigen/unsupported $AM_CFLAGS"
|
||||
AM_CXXFLAGS="-I${abs_srcdir}/include -I${abs_srcdir}/include/Grid $AM_CXXFLAGS"
|
||||
AM_CFLAGS="-I${abs_srcdir}/include -I${abs_srcdir}/include/Grid $AM_CFLAGS"
|
||||
AM_LDFLAGS="-L${cwd}/lib $AM_LDFLAGS"
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
AC_SUBST([AM_CXXFLAGS])
|
||||
|
@ -5,8 +5,7 @@
|
||||
#include <Grid/Hadrons/Module.hpp>
|
||||
#include <Grid/Hadrons/ModuleFactory.hpp>
|
||||
#include <Grid/Hadrons/AllToAllVectors.hpp>
|
||||
|
||||
#include <unsupported/Eigen/CXX11/Tensor>
|
||||
#include <Grid/Eigen/unsupported/CXX11/Tensor>
|
||||
|
||||
BEGIN_HADRONS_NAMESPACE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
#include <Eigen/Dense>
|
||||
#include <Grid/Eigen/Dense>
|
||||
#if defined __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -7,42 +7,29 @@ fi
|
||||
ARC=$1
|
||||
|
||||
INITDIR=`pwd`
|
||||
rm -f lib/Eigen
|
||||
rm -rf Eigen
|
||||
|
||||
##################
|
||||
#untar
|
||||
##################
|
||||
|
||||
tar -xf ${ARC}
|
||||
ARCDIR=`tar -tf ${ARC} | head -n1 | sed -e 's@/.*@@'`
|
||||
rm -f ${ARC}
|
||||
|
||||
###############################
|
||||
# Link to a deterministic name
|
||||
###############################
|
||||
|
||||
mv ${ARCDIR} Eigen
|
||||
mv ${ARCDIR} Eigen
|
||||
ln -s ${INITDIR}/Eigen/Eigen ${INITDIR}/lib/Eigen
|
||||
ln -s ${INITDIR}/Eigen/unsupported/Eigen ${INITDIR}/lib/Eigen/unsupported
|
||||
|
||||
# Eigen source headers
|
||||
cd ${INITDIR}/Eigen
|
||||
|
||||
cd ${INITDIR}/lib
|
||||
echo 'eigen_files =\' > ${INITDIR}/lib/Eigen.inc
|
||||
find Eigen -name "*.h" -print | sed 's/^/ /;$q;s/$/ \\/' >> ${INITDIR}/lib/Eigen.inc
|
||||
|
||||
cd ${INITDIR}
|
||||
echo 'eigen_unsupp_files =\' >> ${INITDIR}/lib/Eigen.inc
|
||||
find Eigen/unsupported/Eigen -name "*.h" -print | sed 's/^/ /;$q;s/$/ \\/' >> ${INITDIR}/lib/Eigen.inc
|
||||
|
||||
|
||||
find -L Eigen -print | sed 's/^/ /;$q;s/$/ \\/' >> ${INITDIR}/lib/Eigen.inc
|
||||
|
||||
###################################
|
||||
# back to home
|
||||
###################################
|
||||
cd ${INITDIR}
|
||||
|
||||
#########################################
|
||||
# Make grid includes happy
|
||||
#########################################
|
||||
mkdir ${INITDIR}/lib/Eigen/
|
||||
|
||||
ln -s ${INITDIR}/Eigen/Eigen/* ${INITDIR}/lib/Eigen/
|
||||
ln -s ${INITDIR}/Eigen/unsupported ${INITDIR}/lib/Eigen/
|
||||
|
Loading…
Reference in New Issue
Block a user