diff --git a/cmake/Modules/CheckAtomic.cmake b/cmake/Modules/CheckAtomic.cmake index d154b11..9831c85 100644 --- a/cmake/Modules/CheckAtomic.cmake +++ b/cmake/Modules/CheckAtomic.cmake @@ -53,7 +53,7 @@ function(check_working_cxx_atomics64 varname) endfunction() # Check for (non-64-bit) atomic operations. -if(MSVC) +if(MSVC OR APPLE) # apple do not need latomic link set(HAVE_CXX_ATOMICS_WITHOUT_LIB True) elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE) # First check if atomics work without the library. @@ -74,7 +74,7 @@ elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE) endif() # Check for 64 bit atomic operations. -if(MSVC) +if(MSVC OR APPLE) # apple do not need latomic link set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True) elseif(LLVM_COMPILER_IS_GCC_COMPATIBLE) # First check if atomics work without the library.