[med-svn] [Git][med-team/terraphast][master] Keep remainings of my attempt to create a dynamic library as patch

Andreas Tille (@tille) gitlab at salsa.debian.org
Tue Jan 18 11:30:06 GMT 2022



Andreas Tille pushed to branch master at Debian Med / terraphast


Commits:
5582c7c9 by Andreas Tille at 2022-01-18T12:28:11+01:00
Keep remainings of my attempt to create a dynamic library as patch

- - - - -


2 changed files:

- + debian/patches/dynamic_lib.patch
- + debian/patches/series


Changes:

=====================================
debian/patches/dynamic_lib.patch
=====================================
@@ -0,0 +1,60 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 20 Oct 2021 09:51:23 +0200
+Description: Attempt to create shared library
+ This patch is deactivated since the build fails with it.
+ Thus we simply stick to the existing static library
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,7 +19,7 @@ Option(TERRAPHAST_ARCH_NATIVE "Use -marc
+ #####################################################################
+ # build library
+ #####################################################################
+-add_library(terraces
++set(terraces_sources
+ 		lib/advanced.cpp
+ 		lib/bigint.cpp
+ 		lib/bipartitions.cpp
+@@ -74,6 +74,12 @@ add_library(terraces
+ 		include/terraces/subtree_extraction.hpp
+ 		include/terraces/trees.hpp
+ )
++add_library(terraces_static ${terraces_sources})
++add_library(terraces SHARED ${terraces_sources})
++target_include_directories(terraces_static
++		PUBLIC include
++		PRIVATE lib
++)
+ target_include_directories(terraces
+ 		PUBLIC include
+ 		PRIVATE lib
+@@ -90,20 +96,26 @@ if(TERRAPHAST_USE_GMP)
+ 	endif()
+ endif()
+ 
+-set(terraces_targets terraces)
++set(terraces_targets terraces terraces_static)
+ 
+ if(TERRAPHAST_BUILD_CLIB)
+-	add_library(terraces_c
++	add_library(terraces_c_static
++			c_lib/terraces.cpp
++			c_include/terraces/terraces.h
++	)
++	add_library(terraces_c SHARED
+ 			c_lib/terraces.cpp
+ 			c_include/terraces/terraces.h
+ 	)
++	target_include_directories(terraces_c_static PUBLIC c_include)
+ 	target_include_directories(terraces_c PUBLIC c_include)
++	target_link_libraries(terraces_c_static terraces_static)
+ 	target_link_libraries(terraces_c terraces)
+ 	if (NOT TERRAPHAST_USE_GMP)
+ 		message(FATAL_ERROR "The C library requires the GMP libraries to build! Enable them using -DTERRAPHAST_USE_GMP=ON")
+ 	endif()
+ 
+-	set(terraces_targets ${terraces_targets} terraces_c)
++	set(terraces_targets ${terraces_targets} terraces_c terraces_c_static)
+ endif()
+ 
+ #####################################################################


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+# dynamic_lib.patch



View it on GitLab: https://salsa.debian.org/med-team/terraphast/-/commit/5582c7c9d060774e769595c5b1a83d7dffcad5e3

-- 
View it on GitLab: https://salsa.debian.org/med-team/terraphast/-/commit/5582c7c9d060774e769595c5b1a83d7dffcad5e3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220118/b99baf98/attachment-0001.htm>


More information about the debian-med-commit mailing list