build: improve macro for testing -latomic requirement

pull/21920/head
MarcoFalke 4 years ago
parent 94f83534e4
commit fa25ce45e9
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -12,11 +12,17 @@ dnl warranty.
m4_define([_CHECK_ATOMIC_testbody], [[ m4_define([_CHECK_ATOMIC_testbody], [[
#include <atomic> #include <atomic>
#include <cstdint> #include <cstdint>
#include <chrono>
using namespace std::chrono_literals;
int main() { int main() {
std::atomic<bool> lock{true}; std::atomic<bool> lock{true};
std::atomic_exchange(&lock, false); std::atomic_exchange(&lock, false);
std::atomic<std::chrono::seconds> t{0s};
t.store(2s);
std::atomic<int64_t> a{}; std::atomic<int64_t> a{};
int64_t v = 5; int64_t v = 5;

Loading…
Cancel
Save