mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
cmake: check for 64-bit atomic operations directly
780bac671f
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
1 changed files with 3 additions and 3 deletions
|
@ -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…
Reference in a new issue