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
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
EXADUNE
dune-common
Commits
e08afee7
Commit
e08afee7
authored
11 years ago
by
Jö Fahlke
Browse files
Options
Downloads
Patches
Plain Diff
[buildsystem] Check for std::thread.
parent
db500f83
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cmake/modules/FindCXX11Features.cmake
+18
-0
18 additions, 0 deletions
cmake/modules/FindCXX11Features.cmake
m4/CMakeLists.txt
+1
-0
1 addition, 0 deletions
m4/CMakeLists.txt
m4/Makefile.am
+1
-0
1 addition, 0 deletions
m4/Makefile.am
m4/dune_std_thread.m4
+30
-0
30 additions, 0 deletions
m4/dune_std_thread.m4
with
50 additions
and
0 deletions
cmake/modules/FindCXX11Features.cmake
+
18
−
0
View file @
e08afee7
...
...
@@ -14,6 +14,7 @@
# HAVE_VARIADIC_TEMPLATES True if variadic templates are supprt
# HAVE_VARIADIC_CONSTRUCTOR_SFINAE True if variadic constructor sfinae is supported
# HAVE_RVALUE_REFERENCES True if rvalue references are supported
# HAVE_STD_THREAD True if std::thread is supported
include
(
CMakePushCheckState
)
cmake_push_check_state
()
...
...
@@ -311,4 +312,21 @@ CHECK_CXX_SOURCE_COMPILES("
"
HAVE_INITIALIZER_LIST
)
# std::thread
CHECK_CXX_SOURCE_COMPILES
(
"
#include <thread>
void f()
{
// do nothing
}
int main()
{
std::thread t(f);
t.join();
}
"
HAVE_STD_THREAD
)
cmake_pop_check_state
()
This diff is collapsed.
Click to expand it.
m4/CMakeLists.txt
+
1
−
0
View file @
e08afee7
...
...
@@ -27,6 +27,7 @@ install(PROGRAMS
dune_docu.m4
dune_linkcxx.m4
dune_mpi.m4
dune_std_thread.m4
dune_streams.m4
dune_tr1_headers.m4
dune_unused.m4
...
...
This diff is collapsed.
Click to expand it.
m4/Makefile.am
+
1
−
0
View file @
e08afee7
...
...
@@ -31,6 +31,7 @@ ALLM4S = \
dune_docu.m4
\
dune_linkcxx.m4
\
dune_mpi.m4
\
dune_std_thread.m4
\
dune_streams.m4
\
dune_tr1_headers.m4
\
dune_unused.m4
\
...
...
This diff is collapsed.
Click to expand it.
m4/dune_std_thread.m4
0 → 100644
+
30
−
0
View file @
e08afee7
# tests for C++11 class std::thread
# the associated macro is called HAVE_STD_THREAD
# the automake conditional is STD_THREAD
AC_DEFUN([DUNE_STD_THREAD],[
AC_REQUIRE([GXX0X])
AC_CACHE_CHECK([whether std::thread is supported], [dune_cv_std_thread_supported], [
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <thread>
void f()
{
// do nothing
}
]],
[[
std::thread t(f);
t.join();
]])],
[dune_cv_std_thread_supported=yes],
[dune_cv_std_thread_supported=no])
AC_LANG_POP([C++])
])
if test "x$dune_cv_std_thread_supported" = xyes; then
AC_DEFINE([HAVE_STD_THREAD], [1], [Define to 1 if std::thread is supported])
fi
AM_CONDITIONAL([STD_THREAD], [test "x$dune_cv_std_thread_supported" = xyes])
])
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