Atri Bhattacharya
5232b74e10
Refresh Fix-linking-of-cadabra-module.patch with fix for same issue committed upstream [gh#kpeeters/cadabra2#202]. OBS-URL: https://build.opensuse.org/request/show/830363 OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=34
27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
From 4df3e7cba29a9bb25a70badbc9de8aeef3693933 Mon Sep 17 00:00:00 2001
|
|
From: Kasper Peeters <kasper.peeters@phi-sci.com>
|
|
Date: Fri, 28 Aug 2020 21:12:58 +0100
|
|
Subject: [PATCH] Link cadabra2.so to libpython.so if system requires it.
|
|
|
|
---
|
|
core/CMakeLists.txt | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
|
|
index 1d4c9851da..71570db28f 100644
|
|
--- a/core/CMakeLists.txt
|
|
+++ b/core/CMakeLists.txt
|
|
@@ -305,6 +305,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
set_target_properties(cadabra2 PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|
target_link_libraries(cadabra2 PRIVATE ${PYTHON_LIBRARIES})
|
|
+elseif(CMAKE_SHARED_LINKER_FLAGS MATCHES ".*-Wl,--no-undefined.*")
|
|
+ # Exception for systems that require no undefined symbols present
|
|
+ # in shared libraries (e.g. openSUSE).
|
|
+ message("-- Linking cadabra2.so to libpython.so because of default linker flags.")
|
|
+ target_link_libraries(cadabra2 PRIVATE ${PYTHON_LIBRARIES})
|
|
endif()
|
|
|
|
if(ENABLE_SYSTEM_JSONCPP)
|
|
|