Put `-latomic` to the other `-l`s

to make it compiling on Raspberry Pi OS bullseye.
This commit is contained in:
Alexander Aleksandrovič Klimov 2021-11-23 16:19:05 +01:00 committed by GitHub
parent c4c51a2b56
commit 7270caf226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -432,10 +432,7 @@ if(NOT MSVC)
# ARM settings
if("${ARCH}" STREQUAL "arm")
check_cxx_source_compiles( "include <atomic>; int main(){ std::atomic<uint_fast64_t> x; x.fetch_add(1); x.sub_add(1); }" CXX_ATOMIC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -latomic")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -latomic")
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -latomic")
link_libraries(atomic)
endif()
else()