Skip to content
Snippets Groups Projects
Commit 0183c2e7 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'atomic-wait' into 'master'

[build] Check if std::atomic wait()/notify{_all}() is avaialble

See merge request !326
parents f4757e36 206ab701
No related branches found
No related tags found
1 merge request!326[build] Check if std::atomic wait()/notify{_all}() is avaialble
Pipeline #77272 failed
...@@ -16,8 +16,25 @@ executable( ...@@ -16,8 +16,25 @@ executable(
dependencies: emper_dep, dependencies: emper_dep,
) )
executable( std_atomic_wait_notify_code = '''\
'io_latency', #include <atomic>
'IoLatency.cpp', int main() {
dependencies: emper_dep, std::atomic<bool> atomic_bool;
atomic_bool.notify_one();
}
'''
cpp_has_std_atomic_wait_noitify = cpp_compiler.links(
std_atomic_wait_notify_code,
args: '--std=c++2a',
name: 'std_atomic_wait_notify',
) )
if cpp_has_std_atomic_wait_noitify
executable(
'io_latency',
'IoLatency.cpp',
dependencies: emper_dep,
)
else
warning('C++ compiler does not support std::atomic wait()/notify()/notify_all(), not building io_latency binary')
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment