Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Leibner
dune-common
Commits
397932c9
Commit
397932c9
authored
8 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[cleanup] Remove mpi-config
Relict from the Autotools era
parent
fc6376f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/CMakeLists.txt
+0
-1
0 additions, 1 deletion
bin/CMakeLists.txt
bin/mpi-config
+0
-197
0 additions, 197 deletions
bin/mpi-config
with
0 additions
and
198 deletions
bin/CMakeLists.txt
+
0
−
1
View file @
397932c9
...
...
@@ -3,6 +3,5 @@ install(PROGRAMS
duneproject
dunecontrol
git-whitespace-hook
mpi-config
dune-remove-autotools
DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
This diff is collapsed.
Click to expand it.
bin/mpi-config
deleted
100755 → 0
+
0
−
197
View file @
fc6376f4
#!/usr/bin/env bash
set
-e
canonicalname
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalname path
>
&2
return
1
fi
name
=
"
$1
"
while
test
-L
"
$name
"
;
do
if
!
test
-e
"
$name
"
;
then
echo
$name
: file not found
>
&2
return
1
fi
if
newname
=
"
`
readlink
$name
`
"
;
then
name
=
"
$newname
"
else
echo
"
$(
dirname
$name
)
/
$(
basename
$name
)
"
fi
done
echo
$name
}
canonicalpath
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalpath path
>
&2
return
1
fi
(
cd
$(
dirname
$(
canonicalname
$1
))
&&
pwd
)
}
findm4dir
()
{
BINDIR
=
"
$(
canonicalpath
$0
)
"
# source-build
M4DIR
=
"
$BINDIR
/../m4"
if
test
-f
"
$M4DIR
/mpi-config.m4"
;
then
echo
"
$M4DIR
"
return
fi
# installed
M4DIR
=
"
$BINDIR
/../share/dune/aclocal"
if
test
-f
"
$M4DIR
/mpi-config.m4"
;
then
echo
"
$M4DIR
"
return
fi
# downloaded
M4DIR
=
"
$BINDIR
"
if
test
-f
"
$M4DIR
/mpi-config.m4"
;
then
echo
"
$M4DIR
"
return
fi
echo
"ERROR: could not find mpi-config.m4! Incomplete installation?"
>
&2
exit
1
}
version
=
0.1
verbose
=
0
usage
()
{
cat
<<
EOF
mpi-config is a tool to help you determine the compiler and linker flags that
you need in order to build your code with MPI. It is very similar to pkg-config,
but doesn't rely on help from your MPI installation. If/when MPI implementations
start supporting pkg-config then mpi-config will become obsolete.
Usage: mpi-config [OPTIONS] [LIBRARIES]
Options:
[--mpicc[=COMPILER]]
[--disable-cxx]
[--verbose]
[--version]
[--mpiversion]
[--libs]
[--cflags]
EOF
exit
$1
}
if
test
$#
-eq
0
;
then
usage 1 1>&2
fi
while
test
$#
-gt
0
;
do
case
"
$1
"
in
-
*
=
*
)
optarg
=
`
echo
"
$1
"
|
sed
's/[-_a-zA-Z0-9]*=//'
`
;;
*
)
optarg
=
;;
esac
case
$1
in
--mpicc
=
*
)
MPICC
=
$optarg
;;
--version
)
echo
$version
exit
0
;;
--verbose
)
verbose
=
1
;;
--disable-cxx
)
disablecxx
=
yes
;;
--mpiversion
)
tasks
=
"
$tasks
print_mpiversion"
;;
--cflags
)
tasks
=
"
$tasks
print_cflags"
;;
--ldflags
)
tasks
=
"
$tasks
print_ldflags"
;;
--libs
)
tasks
=
"
$tasks
print_libs"
;;
*
)
usage 1 1>&2
;;
esac
shift
done
if
test
x
$MPICC
=
x
;
then
MPICC
=
mpicc
fi
#
# LIB
#
# load mpi-config.m4
#
# find m4 file
M4DIR
=
`
findm4dir
`
eval
"
$(
m4
-I
$M4DIR
<<
EOF
changequote([, ])
define([AC_DEFUN],[define([
\$
1],[
\$
2])])
define([AC_MSG_CHECKING],[
if test
$verbose
-gt 0; then
echo -n "checking
\$
@..."
fi
])
define([AC_MSG_RESULT],[
if test
$verbose
-gt 0; then
echo "
\$
@"
fi
])
define([AC_MSG_NOTICE],[
if test
$verbose
-gt 0; then
echo "
\$
@"
fi
])
define([AC_MSG_ERROR],[
if test
$verbose
-gt 0; then
echo "Error:
\$
@"
exit 1
fi
])
include([mpi-config.m4])
MPI_CONFIG_HELPER
EOF
)
"
#
# output methods
#
print_mpiversion
()
{
get_mpiparameters
echo
$MPI_VERSION
}
print_cflags
()
{
get_mpiparameters
if
test
x
$disablecxx
=
xyes
;
then
DUNEMPICPPFLAGS
=
"
$DUNEMPICPPFLAGS
$MPI_NOCXXFLAGS
"
fi
echo
$DUNEMPICPPFLAGS
}
print_ldflags
()
{
get_mpiparameters
echo
$DUNEMPILDFLAGS
}
print_libs
()
{
get_mpiparameters
echo
$DUNEMPILIBS
}
for
task
in
$tasks
;
do
eval
$task
done
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