From: Eric Long Date: Mon, 28 Nov 2022 11:02:57 +0000 (+0000) Subject: Fix CheckCxxAtomic to detect more accurately X-Git-Tag: archive/raspbian/16.2.10+ds-5+rpi1^2^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e00c5bd503ccbdb4f15dfd5d2099eee15b02d0e4;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)