[open-coarrays] 10/80: Add shared libraries (initial version)

Alastair McKinstry mckinstry at moszumanska.debian.org
Wed Oct 25 13:45:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository open-coarrays.

commit 50435aa32edf41fe7e6690c40361dae669d0b7bc
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Fri Jun 3 12:15:54 2016 +0100

    Add shared libraries (initial version)
---
 debian/libcoarrays-dev.install |  4 ++-
 debian/patches/series          |  1 +
 debian/patches/shared.patch    | 56 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/debian/libcoarrays-dev.install b/debian/libcoarrays-dev.install
index ec1a3d5..11e9cff 100644
--- a/debian/libcoarrays-dev.install
+++ b/debian/libcoarrays-dev.install
@@ -1,3 +1,5 @@
 /usr/lib/cmake/*
-/usr/lib/*.a
+/usr/lib/libcaf_single_static.a	/usr/lib/libcaf_single.a
+/usr/lib/libcaf_mpi_static.a	/usr/lib/libcaf_mpi.a
+/usr/lib/libcaf_*.so
 /usr/mod/*	/usr/include
diff --git a/debian/patches/series b/debian/patches/series
index a91789e..dd322ce 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 disable-ns-test.patch
+shared.patch
diff --git a/debian/patches/shared.patch b/debian/patches/shared.patch
new file mode 100644
index 0000000..7144566
--- /dev/null
+++ b/debian/patches/shared.patch
@@ -0,0 +1,56 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Add shared, static versions of libraries
+Forwarded: no
+Last-Updated: 2016-06-03
+ TODO: Make this work without _static 
+
+Index: open-coarrays-1.6.0/src/mpi/CMakeLists.txt
+===================================================================
+--- open-coarrays-1.6.0.orig/src/mpi/CMakeLists.txt
++++ open-coarrays-1.6.0/src/mpi/CMakeLists.txt
+@@ -15,7 +15,8 @@ if(gfortran_compiler AND (NOT opencoarra
+   add_definitions(-DCOMPILER_SUPPORTS_CAF_INTRINSICS)
+ endif()
+ 
+-add_library(caf_mpi mpi_caf.c ../common/caf_auxiliary.c ../extensions/opencoarrays.F90)
++add_library(caf_mpi SHARED  mpi_caf.c ../common/caf_auxiliary.c ../extensions/opencoarrays.F90)
++add_library(caf_mpi_static STATIC  mpi_caf.c ../common/caf_auxiliary.c ../extensions/opencoarrays.F90)
+ 
+ target_include_directories(caf_mpi PRIVATE ${MPI_C_INCLUDE_PATH})
+ if (gfortran_compiler)
+@@ -24,8 +25,11 @@ endif()
+ 
+ include_directories(${CMAKE_BINARY_DIR}/mod)
+ 
+-install(TARGETS caf_mpi EXPORT OpenCoarraysTargets
++install(TARGETS caf_mpi_static EXPORT OpenCoarraysTargets
+   ARCHIVE DESTINATION lib
++  )
++install(TARGETS caf_mpi EXPORT OpenCoarraysTargets
++  DESTINATION lib
+ )
+ install(DIRECTORY  ${CMAKE_BINARY_DIR}/mod DESTINATION .)
+ 
+@@ -74,6 +78,6 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ file(APPEND "${caf_launcher}" "${FOOTER}")
+ 
+ # This could be needed to produce shared libraries:
+-#target_link_libraries(caf_mpi PRIVATE ${MPI_C_LIBRARIES})
++target_link_libraries(caf_mpi PRIVATE ${MPI_C_LIBRARIES} ${MPI_F_LIBRARIES})
+ 
+ #set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${exe_dir}/cafrun;${exe_dir}/caf;${exe_dir}/test-caf-tally.sh")
+Index: open-coarrays-1.6.0/src/single/CMakeLists.txt
+===================================================================
+--- open-coarrays-1.6.0.orig/src/single/CMakeLists.txt
++++ open-coarrays-1.6.0/src/single/CMakeLists.txt
+@@ -1,5 +1,7 @@
+-add_library(caf_single single.c ../common/caf_auxiliary.c)
+-target_compile_options(caf_single INTERFACE -fcoarray=lib)
+-install(TARGETS caf_single EXPORT OpenCoarraysTargets
++add_library(caf_single SHARED single.c ../common/caf_auxiliary.c)
++add_library(caf_single_static single.c ../common/caf_auxiliary.c)
++target_compile_options(caf_single_static INTERFACE -fcoarray=lib)
++install(TARGETS caf_single_static EXPORT OpenCoarraysTargets
+   ARCHIVE DESTINATION lib
+ )
++install(TARGETS caf_single EXPORT OpenCoarraysTargets DESTINATION lib)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/open-coarrays.git



More information about the debian-science-commits mailing list