You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.3 KiB
36 lines
1.3 KiB
From e2a8b0adbd099cfda84e931f6a24f34e80b12fd7 Mon Sep 17 00:00:00 2001
|
|
From: Dmitry Shachnev <mitya57@gmail.com>
|
|
Date: Sat, 7 May 2022 20:51:25 +0300
|
|
Subject: [PATCH] Hardcode atomic_LIB as -latomic
|
|
|
|
find_library does not always work because libatomic.so may be in a path
|
|
like /usr/lib/gcc/x86_64-linux-gnu/11/libatomic.so, which CMake does not
|
|
consider by default.
|
|
|
|
Pick-to: 6.3
|
|
Change-Id: I73a657c470efa4f84f8629bd531edfcac3b3a352
|
|
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
---
|
|
cmake/FindWrapAtomic.cmake | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/cmake/FindWrapAtomic.cmake b/cmake/FindWrapAtomic.cmake
|
|
index 3ea72bb188..006be0ed8f 100644
|
|
--- a/cmake/FindWrapAtomic.cmake
|
|
+++ b/cmake/FindWrapAtomic.cmake
|
|
@@ -33,7 +33,7 @@ int main(int, char **)
|
|
check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC)
|
|
if(NOT HAVE_STDATOMIC)
|
|
set(_req_libraries "${CMAKE_REQUIRED_LIBRARIES}")
|
|
- find_library(atomic_LIB atomic REQUIRED)
|
|
+ set(atomic_LIB "-latomic")
|
|
set(CMAKE_REQUIRED_LIBRARIES ${atomic_LIB})
|
|
check_cxx_source_compiles("${atomic_test_sources}" HAVE_STDATOMIC_WITH_LIB)
|
|
set(CMAKE_REQUIRED_LIBRARIES "${_req_libraries}")
|
|
--
|
|
2.35.1
|
|
|