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
30ea0414
Commit
30ea0414
authored
8 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Enable optional NVTX profiling and add clang specific compiler flags
parent
434dddaa
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
+37
-9
37 additions, 9 deletions
build/configure.ac
with
37 additions
and
9 deletions
build/configure.ac
+
37
−
9
View file @
30ea0414
...
...
@@ -92,7 +92,11 @@ AC_ARG_ENABLE(
[AS_HELP_STRING([--enable-mpi], [enable MPI compilation [default=auto]])],
[
if test "x$enableval" = "xno"; then
AC_PROG_CXX([g++ clang])
if test "x$CXX" = "x"; then
AC_PROG_CXX([g++ clang++])
else
AC_PROG_CXX([$CXX])
fi
AC_MSG_NOTICE([Using $CXX])
AC_SUBST([MPIFLAGS], [""])
elif test "x$enableval" = "xauto"; then
...
...
@@ -100,7 +104,7 @@ AC_ARG_ENABLE(
if test "x$CXX" != "x"; then
AC_SUBST([MPIFLAGS], [-DUSE_MPI])
else
AC_PROG_CXX([g++ clang])
AC_PROG_CXX([g++ clang
++
])
AC_SUBST([MPIFLAGS], [""])
fi
elif test "x$enableval" = "xyes"; then
...
...
@@ -113,17 +117,28 @@ AC_ARG_ENABLE(
fi
],
[
AC_PROG_CXX([mpicxx mpic++ mpiCC])
if test "x$CXX" != "x"; then
AC_SUBST([MPIFLAGS], [-DUSE_MPI])
if test "x$CXX" = "x"; then
AC_PROG_CXX([mpicxx mpic++ mpiCC])
if test "x$CXX" != "x"; then
AC_SUBST([MPIFLAGS], [-DUSE_MPI])
else
AC_PROG_CXX([g++ clang++])
AC_SUBST([MPIFLAGS], [""])
AC_MSG_NOTICE([Using $CXX])
fi
else
AC_PROG_CXX([g++ clang])
AC_SUBST([MPIFLAGS], [""])
AC_MSG_NOTICE([Using $CXX])
AC_PROG_CXX([$CXX])
fi
]
)
AC_PROG_F77([gfortran f77])
# Check whether the compiler is clang++ (needs additional flags)
CXX_IS_CLANG=$($CXX --version | grep clang)
AS_IF(
[test "x$CXX_IS_CLANG" = "x0"],
[AC_SUBST([CLANGFLAGS], [-stdlib=libstdc++])],
[AC_SUBST([CLANGFLAGS], [""])]
)
# Libtool initialization
LT_INIT
...
...
@@ -219,8 +234,21 @@ AC_ARG_WITH(
]
)
AC_ARG_ENABLE(
[nvtx],
[AS_HELP_STRING([--enable-nvtx], [use NVTX profiling @<:@default=no@:>@])],
[
if test "x$enableval" = "xyes"; then
AC_SUBST([NVTXFLAGS], ["-DUSE_NVTX"])
fi
],
[
AC_SUBST([NVTXFLAGS], [""])
]
)
FFLAGS="-std=legacy -O3"
CXXFLAGS="-O3 -ggdb -I$HDF5_INCLUDE $MP
I
FLAGS $
O
MPFLAGS $LAPACKFLAGS $MAGMAFLAGS"
CXXFLAGS="
$CLANGFLAGS
-O3 -ggdb -I$HDF5_INCLUDE $
O
MPFLAGS $MP
I
FLAGS $LAPACKFLAGS $MAGMAFLAGS
$NVTXFLAGS
"
SUBDIRS="cluster libnptm sphere testing trapping"
# Send output to Makefiles
...
...
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