diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 91f90c62a..e473b75ca 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -215,9 +215,10 @@ int main () { check_cxx_source_compiles(" #include #include -std::atomic x; +std::atomic x (0); int main() { - return x; +uint64_t i = x.load(std::memory_order_relaxed); +return std::atomic_is_lock_free(&x); }" LIBATOMIC_NOT_NEEDED) IF (NOT LIBATOMIC_NOT_NEEDED)