Skip to content

Commit

Permalink
Merge branch 'stage-1.0.2' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
aradi committed Dec 9, 2021
2 parents cd7c2a7 + 199fe6f commit 0d5750d
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ Change Log

Notable project changes in various releases.


1.0.2
=====

Fixed
-----

* ScaLAPACK finder exports (also) the target name "scalapack" to be compatible
with the CMake export file distributed with ScaLAPACK.


1.0.1
=====

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(ScalapackFxUtils)

include(${CMAKE_CURRENT_SOURCE_DIR}/config.cmake)

project(ScalapackFx VERSION 1.0.1 LANGUAGES Fortran)
project(ScalapackFx VERSION 1.0.2 LANGUAGES Fortran)

setup_build_type()

Expand Down
32 changes: 22 additions & 10 deletions cmake/Modules/FindCustomScalapack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ ScaLAPACK is MPI-based and defines a respective dependency on
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported target, if found:
This module provides the following imported targets, if found:
``scalapack``
The ScaLAPACK library. The name was chosen to be compatible with the name used by the CMake
export file (which is unfortunately broken in several binary packages).
``Scalapack::Scalapack``
The ScaLAPACK library
Name space (and CMake-style capitalized) variant of the scalapack target.
Result Variables
Expand Down Expand Up @@ -63,7 +67,7 @@ The following cache variables may be set to influence the library detection:
include(FindPackageHandleStandardArgs)
include(CustomLibraryFinder)

if(TARGET Scalapack::Scalapack)
if(TARGET scalapack)

set(CUSTOMSCALAPACK_FOUND True)
set(CustomScalapack_FOUND True)
Expand All @@ -75,7 +79,7 @@ else()
find_package(MPI ${Find_Scalapack_REQUIRED})

option(SCALAPACK_DETECTION "Whether ScaLAPACK library should be detected" TRUE)

if(SCALAPACK_DETECTION)

if("${SCALAPACK_LIBRARY}" STREQUAL "")
Expand All @@ -98,11 +102,11 @@ else()
"${CustomScalapack_FIND_QUIETLY}" _libs)
set(SCALAPACK_LIBRARY "${_libs}" CACHE STRING "List of ScaLAPACK libraries to link" FORCE)
unset(_libs)

endif()

set(SCALAPACK_DETECTION False CACHE BOOL "Whether ScaLAPACK libraries should be detected" FORCE)

endif()

find_package_handle_standard_args(CustomScalapack REQUIRED_VARS SCALAPACK_LIBRARY
Expand All @@ -112,13 +116,21 @@ else()
set(Scalapack_FOUND ${CUSTOMSCALAPACK_FOUND})

if(SCALAPACK_FOUND)
add_library(Scalapack::Scalapack INTERFACE IMPORTED)
if(NOT "${SCALAPACK_LIBRARY}" STREQUAL "NONE")
target_link_libraries(Scalapack::Scalapack INTERFACE "${SCALAPACK_LIBRARY}")
if(NOT TARGET scalapack)
add_library(scalapack INTERFACE IMPORTED)
if(NOT "${SCALAPACK_LIBRARY}" STREQUAL "NONE")
target_link_libraries(scalapack INTERFACE "${SCALAPACK_LIBRARY}")
endif()
target_link_Libraries(scalapack INTERFACE MPI::MPI_Fortran)
endif()
target_link_Libraries(Scalapack::Scalapack INTERFACE MPI::MPI_Fortran)
endif()

mark_as_advanced(SCALAPACK_DETECTION SCALAPACK_LIBRARY SCALAPACK_LIBRARY_DIR)

endif()

# Add namespaced library name variant
if(TARGET scalapack AND NOT TARGET Scalapack::Scalapack)
add_library(Scalapack::Scalapack INTERFACE IMPORTED)
target_link_libraries(Scalapack::Scalapack INTERFACE scalapack)
endif()
2 changes: 1 addition & 1 deletion doc/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PROJECT_NAME = "ScaLAPACKFX"
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = "1.0.1"
PROJECT_NUMBER = "1.0.2"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
version = '1.0'

# The full version, including alpha/beta/rc tags.
release = '1.0.1'
release = '1.0.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion lib/scalapackfx.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#:set FORTRAN_KINDS = {'real': 'sp', 'dreal': 'dp', 'complex': 'sp',&
& 'dcomplex': 'dp'}

#! Returns colons within paranthesis according to the RANK or empty string
#! Returns colons within parenthesis according to the RANK or empty string
#! if RANK is zero.
#:def RANKSUFFIX(RANK)
${'' if RANK == 0 else '(' + ':' + ',:' * (RANK - 1) +')'}$
Expand Down

0 comments on commit 0d5750d

Please sign in to comment.