From: Eric Long Date: Wed, 4 Dec 2024 05:46:17 +0000 (+0100) Subject: Fix CheckCxxAtomic to detect more accurately X-Git-Tag: archive/raspbian/16.2.15+ds-0+deb12u1+rpi1~1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d05bda57b55aa81128e5a818d4dae5d42a78abf1;p=ceph.git Fix CheckCxxAtomic to detect more accurately Last-Update: 2022-08-30 Some platforms like riscv64 does not have full support for atomic primitives, yet passes the test. Adding operator++ fixes this issue. Gbp-Pq: Name fix-CheckCxxAtomic-riscv64.patch --- diff --git a/cmake/modules/CheckCxxAtomic.cmake b/cmake/modules/CheckCxxAtomic.cmake index 833977b75..5510193a6 100644 --- a/cmake/modules/CheckCxxAtomic.cmake +++ b/cmake/modules/CheckCxxAtomic.cmake @@ -32,7 +32,7 @@ int main() { std::atomic w2; std::atomic w4; std::atomic w8; - return w1 + w2 + w4 + w8; + return ++w1 + ++w2 + ++w4 + ++w8; } " ${var}) endfunction(check_cxx_atomics)