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.
This commit is contained in:
parent
780bac671f
commit
8f2f3b648f
@ -191,10 +191,10 @@ FIND_PROGRAM(SED sed)
|
||||
# https://github.com/fish-shell/fish-shell/issues/5865
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <atomic>
|
||||
struct big { int foo[64]; };
|
||||
std::atomic<big> x;
|
||||
#include <cstdint>
|
||||
std::atomic<uint64_t> x;
|
||||
int main() {
|
||||
return x.load().foo[13];
|
||||
return x;
|
||||
}"
|
||||
LIBATOMIC_NOT_NEEDED)
|
||||
IF (NOT LIBATOMIC_NOT_NEEDED)
|
||||
|
Loading…
x
Reference in New Issue
Block a user