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
eb6c2cf3
Commit
eb6c2cf3
authored
20 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
improved compiler test.. works with icc 8.0
[[Imported from SVN: r964]]
parent
0b87b055
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
m4/dune_compiler.m4
+35
-11
35 additions, 11 deletions
m4/dune_compiler.m4
with
35 additions
and
11 deletions
m4/dune_compiler.m4
+
35
−
11
View file @
eb6c2cf3
# $Id$
# check for
gcc >= 3.4.1
# check for
supported compilers
AC_DEFUN([DUNE_CHECK_COMPILER],[
AC_ARG_ENABLE(compilercheck,
AC_HELP_STRING([--enable-compilercheck],
[check for supported compilers \[default=yes\]]),
[compilercheck=$enable],
[compilercheck=yes]
)
SUPPORTED_COMPILER="gcc (>= 3.4.1) or icc (>= 7.0)"
AC_REQUIRE([AC_PROG_CXX])
cat >conftest.cc <<_ACEOF
#ifdef __ICC
#if __ICC >= 700
#define CXX_SUPPORTED
#endif
#endif
#ifdef __GNUC__
#if __GNUC__ > 3 || \
(__GNUC__ == 3 && (__GNUC_MINOR__ > 4 || \
(__GNUC_MINOR__ == 4 && \
__GNUC_PATCHLEVEL__ >= 1)))
#else
#error You need gcc version >= 3.4.1
#if __GNUC__ > 3 || \
(__GNUC__ == 3 && (__GNUC_MINOR__ > 4 || \
(__GNUC_MINOR__ == 4 && \
__GNUC_PATCHLEVEL__ >= 1)))
#define CXX_SUPPORTED
#endif
#endif
#ifndef CXX_SUPPORTED
#error Your compiler is not officially supprted by dune
#endif
int main() { return 0; }
_ACEOF
if $CXX conftest.cc -o conftest.$ac_exeext >&5; then
rm -f conftest.$ac_exeext
if test "x$compilercheck" != "xyes" ; then
AC_MSG_WARN([compilercheck is disabled. DANGEROUS!])
else
AC_MSG_ERROR([When using gcc, you need gcc-version >= 3.4.1])
if $CXX conftest.cc -o conftest.$ac_exeext >&5; then
rm -f conftest.$ac_exeext
else
AC_MSG_ERROR([Your compiler is not officially supported by dune
dune is known to work with $SUPPORTED_COMPILER])
fi
fi
])
\ No newline at end of file
])
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