From 8f2f3b648ff49588d87f1529b2ff9584a9a1e95b Mon Sep 17 00:00:00 2001 From: David Adam Date: Fri, 20 Dec 2019 23:47:46 +0800 Subject: [PATCH] cmake: check for 64-bit atomic operations directly 780bac671f45ab2c5ef15c9e7d6dff0031673e28 did not actually successfully compile on any platforms, leading to -latomic always being added (including on platforms it does not exist on). Work on #5865. --- cmake/ConfigureChecks.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 69dbb17b0..59d48140e 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -191,10 +191,10 @@ FIND_PROGRAM(SED sed) # https://github.com/fish-shell/fish-shell/issues/5865 CHECK_CXX_SOURCE_COMPILES(" #include -struct big { int foo[64]; }; -std::atomic x; +#include +std::atomic x; int main() { - return x.load().foo[13]; + return x; }" LIBATOMIC_NOT_NEEDED) IF (NOT LIBATOMIC_NOT_NEEDED)