Commit 78ceea82 authored by incardon's avatar incardon

New configure

parent 1c50460a
Pipeline #918 failed with stages
in 3 minutes and 16 seconds
......@@ -10,7 +10,6 @@ if [ ! -d $HOME/openfpm_dependencies/openfpm_data/LIBHILBERT ]; then
./install_LIBHILBERT.sh $HOME/openfpm_dependencies/openfpm_data/ 4
fi
rm -rf $HOME/openfpm_dependencies/openfpm_data/BOOST
if [ ! -d $HOME/openfpm_dependencies/openfpm_data/BOOST ]; then
if [ x"$2" == x"mac," ]; then
......
......@@ -120,6 +120,7 @@ with_eigen
enable_gpu
'
rm -rf build
if [ ! -d "build" ]; then
mkdir build
fi
......@@ -214,6 +215,7 @@ do
case $ac_useropt in
debug)
conf_options="$conf_options -DCMAKE_BUILD_TYPE=Debug"
debug_mode=1
;;
se_class1)
conf_options="$conf_options -DSE_CLASS1=ON"
......@@ -224,6 +226,9 @@ do
se_class3)
conf_options="$conf_options -DSE_CLASS3=ON"
;;
gpu)
conf_options="$conf_options -DENABLE_GPU=ON"
;;
*) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
ac_unrecognized_sep=', '
;;
......@@ -326,7 +331,10 @@ do
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$ac_optarg ;;
prefix=$ac_optarg
conf_options="$conf_options -DCMAKE_INSTALL_PREFIX=$ac_optarg"
echo "$prefix" > install_dir
;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
......@@ -429,6 +437,27 @@ do
libhilbert)
conf_options="$conf_options -DLIBHILBERT_ROOT=$ac_optarg"
;;
metis)
conf_options="$conf_options -DMETIS_ROOT=$ac_optarg"
;;
parmetis)
conf_options="$conf_options -DPARMETIS_ROOT=$ac_optarg"
;;
hdf5)
conf_options="$conf_options -DHDF5_ROOT=$ac_optarg"
;;
petsc)
conf_options="$conf_options -DPETSC_ROOT=$ac_optarg"
;;
blas)
conf_options="$conf_options -DOPENBLAS_ROOT=$ac_optarg"
;;
suitesparse)
conf_options="$conf_options -DSUITESPARSE_ROOT=$ac_optarg"
;;
eigen)
conf_options="$conf_options -DEIGEN3_ROOT=$ac_optarg"
;;
boost)
conf_options="$conf_options -DBOOST_ROOT=$ac_optarg"
;;
......@@ -496,24 +525,44 @@ Try \`$0 --help' for more information"
esac
done
if [ x"$debug_mode" != x"1" ]; then
conf_options="$conf_options -DCMAKE_BUILD_TYPE=Release"
fi
cd build
## remove enerything
echo "Calling cmake ../. $conf_options"
rm ../error_code
cmake ../. $conf_options
if [ $? != 0 ]; then
#ok something went wrong the install script analyze the return code to potentially fix the problem automatically
# Read the error code and exit with that
if [ -f ../error_code ]; then
ecod=$(cat ../error_code)
if [ x"$ecod" == x"0" ]; then
exit 1
else
echo "Analyze error $ecod"
exit $ecod
fi
else
exit 1
fi
fi
cd ..
echo "SUBDIRS := build
echo "all:
\$(MAKE) -C build \$@
clean:
\$(MAKE) -C build \$@
all: \$(SUBDIRS)
\$(SUBDIRS):
\$(MAKE) -C \$@
install:
\$(MAKE) -C build \$@
.PHONY: all \$(SUBDIRS)" > Makefile
.PHONY: all clean install" > Makefile
echo "$0 $@" > config.log
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment