diff options
| author | levlam <levlam@telegram.org> | 2024-03-03 02:14:53 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2024-03-03 02:14:53 +0300 |
| commit | b788136508be35d67092d98e33cbf3d7063647ec (patch) | |
| tree | 8ddce356a8ad987cdc71a7b1f20c92a24563b8ed /CMake | |
| parent | 1e8e2fcecc67b988212acc79cf652bcffed14bf2 (diff) | |
Minor improvements.
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/FindAtomics.cmake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/CMake/FindAtomics.cmake b/CMake/FindAtomics.cmake index c35d625f0..a85513258 100644 --- a/CMake/FindAtomics.cmake +++ b/CMake/FindAtomics.cmake @@ -18,19 +18,19 @@ include(CheckCXXSourceCompiles) # RISC-V only has 32-bit and 64-bit atomic instructions. GCC is supposed # to convert smaller atomics to those larger ones via masking and -# shifting like LLVM, but it’s a known bug that it does not. This means +# shifting like LLVM, but it's a known bug that it does not. This means # anything that wants to use atomics on 1-byte or 2-byte types needs # to link atomic library, but not 4-byte or 8-byte (though it does no harm). set(ATOMIC_CODE " - #include <atomic> - #include <cstdint> - std::atomic<std::uint8_t> n8(0); // riscv64 - std::atomic<std::uint64_t> n64(0); // armel, mipsel, powerpc - int main() { - ++n8; - ++n64; - }") + #include <atomic> + #include <cstdint> + std::atomic<std::uint8_t> n8{0}; // riscv64 + std::atomic<std::uint64_t> n64{0}; // armel, mipsel, powerpc + int main() { + ++n8; + ++n64; + }") set(ATOMICS_LIBS " " "-latomic") if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") |
