Skip to content

Commit

Permalink
Fix static Fortran build
Browse files Browse the repository at this point in the history
  • Loading branch information
billschereriii committed Jul 10, 2023
1 parent 53df04a commit 9765955
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
43 changes: 21 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,27 @@ include_directories(SYSTEM
install/include
)

# Build the main SmartRedis library
add_library(smartredis ${SMARTREDIS_LINK_MODE} ${CLIENT_SRC})
set_target_properties(smartredis PROPERTIES
SUFFIX ${SMARTREDIS_LINK_LIBRARY_SUFFIX}
)
set_target_properties(smartredis PROPERTIES
OUTPUT_NAME ${SMARTREDIS_LIB}
)
target_link_libraries(smartredis PUBLIC ${EXT_CLIENT_LIBRARIES} PRIVATE Threads::Threads)

# Install SmartRedis header files
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
DESTINATION "include"
FILES_MATCHING
PATTERN "*.h" PATTERN "*.tcc" PATTERN "*.inc"
)

# Install dynamic library and headers
install(TARGETS smartredis
LIBRARY DESTINATION lib)

# Build the Fortran library
if (SR_FORTRAN)
set(FORTRAN_SRC
Expand Down Expand Up @@ -152,28 +173,6 @@ if (SR_FORTRAN)
LIBRARY DESTINATION lib)
endif()


# Build the main SmartRedis library
add_library(smartredis ${SMARTREDIS_LINK_MODE} ${CLIENT_SRC})
set_target_properties(smartredis PROPERTIES
SUFFIX ${SMARTREDIS_LINK_LIBRARY_SUFFIX}
)
set_target_properties(smartredis PROPERTIES
OUTPUT_NAME ${SMARTREDIS_LIB}
)
target_link_libraries(smartredis PUBLIC ${EXT_CLIENT_LIBRARIES} PRIVATE Threads::Threads)

# Install SmartRedis header files
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
DESTINATION "include"
FILES_MATCHING
PATTERN "*.h" PATTERN "*.tcc" PATTERN "*.inc"
)

# Install dynamic library and headers
install(TARGETS smartredis
LIBRARY DESTINATION lib)

# Build the Python library for SmartRedis
if(SR_PYTHON)
message("-- Python client build enabled")
Expand Down
3 changes: 3 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ To be released at some future point in time

Description

- Fix static linkage for Fortran client
- Improved clustered redis initialization

Detailed Notes

- The Fortran client will no longer statically link to the SmartRedis library generated from the previous compilation attempt (PR372_)
- Reuse existing redis connection when mapping the Redis cluster (PR364_)

.. _PR372: https://github.com/CrayLabs/SmartRedis/pull/372
.. _PR364: https://github.com/CrayLabs/SmartRedis/pull/364

0.4.1
Expand Down

0 comments on commit 9765955

Please sign in to comment.