1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
From: Thomas Krennwallner <tkren@kr.tuwien.ac.at>
Date: Fri, 13 Mar 2020 06:15:35 -0400
Subject: check for libatomic when compiling with gcc
Last-Update: 2020-03-13
Forwarded: no
clasp requires c++11 threads with 64bit __atomic_exchange, we need to
link with libatomic on armel, powerpc, powerpcspe, m68k, mips, mipsel,
and sh4, see also https://gcc.gnu.org/wiki/Atomic and
https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac53787..4195551 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,7 +62,7 @@ if (CLASP_BUILD_WITH_THREADS)
find_package(Threads REQUIRED)
# Add libatomic if necessary
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_USE_PTHREADS_INIT)
+ if (CMAKE_USE_PTHREADS_INIT)
include (CheckCXXSourceCompiles)
set (OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set (OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
|