From 5ec910cdfca1aa12792300e869684252fba00a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sj=C3=B6lund?= Date: Fri, 11 Jun 2021 11:21:22 +0200 Subject: [PATCH] The atomic library needs to be linked on more Linux versions Previously only 32-bit Linux were linked, but arm64 (on Xenial, but not more recent versions) also needs it. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1589f922..ac84fa0f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)