From: Eric Long Date: Mon, 9 Jan 2023 10:41:27 +0000 (+0000) Subject: Fix CheckCxxAtomic to detect more accurately X-Git-Tag: archive/raspbian/16.2.10+ds-5+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2c07e90a125f40f1b92fcb46a75a4fa32d8a4d7d;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)