diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e33d28cf..6f1bc382e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -565,6 +565,12 @@ if(WITH_MYFILE_MMAP) add_definitions(-DMYFILE_MMAP) endif() +# Atomic is required in some builds: #6821 +find_package(ATOMIC) +if(ATOMIC_FOUND) + target_link_libraries(executable ${ATOMIC_LIBRARIES}) +endif() + if(WITH_LTO) # Using LTO with older versions of binutils requires setting extra flags set(BINUTILS_VERSION_MININUM "2.29")