Call findATOMIC.cmake

libatomic is required in some builds. see #6821
This commit is contained in:
Richard E Barber 2023-08-28 09:37:08 -07:00 committed by GitHub
parent f0b282a695
commit ea33323d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")