Skip to content

Commit

Permalink
The atomic library needs to be linked on more Linux versions
Browse files Browse the repository at this point in the history
Previously only 32-bit Linux were linked, but arm64 (on Xenial, but not
more recent versions) also needs it.
  • Loading branch information
sjoelund committed Jun 11, 2021
1 parent 0722da6 commit 5ec910c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ else()
message(STATUS "Using std::regex, the gcc/clang compiler is good enough")
ENDIF()

# adrpo: for some strange reson we need -latomic on 32bit Linux
IF("${ABI}" STREQUAL "LINUX32")
# We need -latomic on some Linux versions, so let's link it on all Linux to make sure it works
IF("${ABI}" MATCHES "^LINUX")
message(WARNING, "Using -latomic -lboost_atomic for ${ABI}")
set(LIB_ATOMIC atomic)
set(LIB_BOOST_ATOMIC atomic)
ELSE()
message(STATUS "ABI is: ${ABI}")
ENDIF("${ABI}" STREQUAL "LINUX32")
ENDIF("${ABI}" MATCHES "^LINUX")

# Enable verbose output from Makefile builds
set(CMAKE_VERBOSE_MAKEFILE ON)
Expand Down

0 comments on commit 5ec910c

Please sign in to comment.