Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
bfde602f
Commit
bfde602f
authored
8 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Enable optional MPI compilation
parent
625c8b9d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/configure.ac
+91
-2
91 additions, 2 deletions
build/configure.ac
with
91 additions
and
2 deletions
build/configure.ac
+
91
−
2
View file @
bfde602f
...
...
@@ -33,8 +33,95 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# Compiler detection
AM_PROG_AR
AC_PROG_F77([mpif90 gfortran f77])
AC_PROG_CXX([mpicxx g++ clang])
AC_ARG_ENABLE(
[mpi],
[AS_HELP_STRING([--enable-mpi], [use MPI if available (default is yes)])],
[
if test "x$enableval" = "xno"; then
if test "x$F77" = "xmpif90"; then
gfortran --version > /dev/null
if test "x$?" = "x0"; then
export F77=gfortran
fi
fi
if test "x$F77" = "xmpif90"; then
f77 --version > /dev/null
if test "x$?" = "x0"; then
export F77=f77
fi
fi
if test "x$CXX" = "xmpicxx"; then
g++ --version > /dev/null
if test "x$?" = "x0"; then
export CXX=g++
fi
fi
if test "x$CXX" = "xmpicxx"; then
clang --version > /dev/null
if test "x$?" = "x0"; then
export CXX=clang
fi
fi
if test "x$F77" = "x"; then
gfortran --version > /dev/null
if test "x$?" = "x0"; then
export F77=gfortran
fi
fi
if test "x$F77" = "x"; then
f77 --version > /dev/null
if test "x$?" = "x0"; then
export F77=f77
fi
fi
if test "x$CXX" = "x"; then
g++ --version > /dev/null
if test "x$?" = "x0"; then
export CXX=g++
fi
fi
if test "x$CXX" = "x"; then
clang --version > /dev/null
if test "x$?" = "x0"; then
export CXX=clang
fi
fi
else
mpicxx --version > /dev/null
if test "x$?" = "x0"; then
export CXX=mpicxx
export F77=mpif90
else
AC_MSG_ERROR(["MPI was enabled, but no MPI compiler was found!"])
fi
fi
],
[
if test "x$CXX" = "x"; then
mpicxx --version > /dev/null
if test "x$?" = "x0"; then
export CXX=mpicxx
export F77=mpif90
fi
fi
if test "x$CXX" = "x"; then
g++ --version > /dev/null
if test "x$?" = "x0"; then
export CXX=g++
fi
fi
if test "x$CXX" = "x"; then
clang --version > /dev/null
if test "x$?" = "x0"; then
export CXX=clang
fi
fi
]
)
AC_SUBST([CXX])
AC_PROG_CXX(CXX)
AC_SUBST([F77])
AC_PROG_F77([$F77 mpif90 gfortran f77])
# Libtool initialization
LT_INIT
...
...
@@ -70,6 +157,8 @@ AS_IF(
)
AC_SUBST([HDF5_LDFLAGS])
# Configure the optional features
# Send output to Makefiles
AC_CONFIG_FILES([Makefile])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment