Skip to content

Commit

Permalink
build/cmake: Link libatomic where needed for 64-bit atomic ops.
Browse files Browse the repository at this point in the history
Link against libatomic also on architectures that need it for 64-bit
atomic operations.  ARM EABI (armel) and little-endian MIPS (mipsel)
are two such architectures.
  • Loading branch information
bandali0 authored and aberaud committed Nov 28, 2023
1 parent 4c1c6cf commit 4592663
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED on)

# Dependencies
if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB
# For ARM EABI (armel), little-endian MIPS (mipsel), etc.
OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
link_libraries (atomic)
endif ()

Expand Down

0 comments on commit 4592663

Please sign in to comment.