From: Eric Long Date: Fri, 27 Jan 2023 15:46:08 +0000 (+0000) Subject: Fix CheckCxxAtomic to detect more accurately X-Git-Tag: archive/raspbian/16.2.11+ds-1+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=381f446834738067031b88929d6d0ad333dc8d79;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)