Skip to content

Commit 1cad194

Browse files
authored
Merge pull request #48 from drew-parsons/dparsons/project_version_soname
set project version and shared library soname
2 parents 452d4db + a6409dd commit 1cad194

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

CMakeLists.txt

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
cmake_minimum_required(VERSION 3.2)
2-
project(SCALAPACK C Fortran)
2+
3+
project(SCALAPACK VERSION 2.2.1 LANGUAGES C Fortran)
4+
35
# Configure the warning and code coverage suppression file
46
configure_file(
57
"${SCALAPACK_SOURCE_DIR}/CMAKE/CTestCustom.cmake.in"
@@ -232,13 +234,22 @@ append_subdir_files(src-C "SRC")
232234

233235
if (UNIX)
234236
add_library(scalapack ${blacs} ${tools} ${tools-C} ${extra_lapack} ${pblas} ${pblas-F} ${ptzblas} ${ptools} ${pbblas} ${redist} ${src} ${src-C})
237+
set_target_properties(scalapack PROPERTIES
238+
VERSION ${SCALAPACK_VERSION}
239+
SOVERSION ${SCALAPACK_VERSION_MAJOR}.${SCALAPACK_VERSION_MINOR})
235240
target_link_libraries( scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
236241
scalapack_install_library(scalapack)
237242
else (UNIX) # Need to separate Fortran and C Code
238243
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON )
239244
add_library(scalapack ${blacs} ${tools-C} ${pblas} ${ptools} ${redist} ${src-C})
245+
set_target_properties(scalapack PROPERTIES
246+
VERSION ${SCALAPACK_VERSION}
247+
SOVERSION ${SCALAPACK_VERSION_MAJOR}.${SCALAPACK_VERSION_MINOR})
240248
target_link_libraries( scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
241249
add_library(scalapack-F ${pblas-F} ${pbblas} ${ptzblas} ${tools} ${src} ${extra_lapack} )
250+
set_target_properties(scalapack-F PROPERTIES
251+
VERSION ${SCALAPACK_VERSION}
252+
SOVERSION ${SCALAPACK_VERSION_MAJOR}.${SCALAPACK_VERSION_MINOR})
242253
target_link_libraries( scalapack-F ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
243254
scalapack_install_library(scalapack)
244255
scalapack_install_library(scalapack-F)
@@ -255,10 +266,9 @@ endif()
255266
SET(CPACK_PACKAGE_NAME "ScaLAPACK")
256267
SET(CPACK_PACKAGE_VENDOR "University of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd")
257268
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ScaLAPACK- Linear Algebra Package")
258-
set(SCALAPACK_VERSION 2.1.0)
259-
set(CPACK_PACKAGE_VERSION_MAJOR 2)
260-
set(CPACK_PACKAGE_VERSION_MINOR 1)
261-
set(CPACK_PACKAGE_VERSION_PATCH 0)
269+
set(CPACK_PACKAGE_VERSION_MAJOR ${SCALAPACK_VERSION_MAJOR})
270+
set(CPACK_PACKAGE_VERSION_MINOR ${SCALAPACK_VERSION_MINOR})
271+
set(CPACK_PACKAGE_VERSION_PATCH ${SCALAPACK_VERSION_PATCH})
262272
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
263273
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "SCALAPACK")
264274
IF(WIN32 AND NOT UNIX)

README

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,16 @@ Even then, the tests "xssep", "xsgsep" and "xssyevr" will fail, because they
153153
are already written with the assumption that an integer fits into memory
154154
occupied by a real number, which is mostly not true for combination of default
155155
Fortran real numbers and long integers.
156+
157+
ScaLAPACK Library Versioning
158+
----------------------
159+
160+
From v2.2.1, the ScaLAPACK library is generated with a versioned name
161+
(i.e. with a shared library ABI soname) according to the following pattern:
162+
163+
- We assume that the ABI updates with each MINOR release.
164+
- An API update (and therefore an ABI update) will be expected with any MAJOR release.
165+
- No ABI update should occur between PATCH releases.
166+
167+
Hence with the full version in triplet form as MAJOR.MINOR.PATCH,
168+
the shared library soname will be libscalapack.so.MAJOR.MINOR.

0 commit comments

Comments
 (0)