Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
billschereriii committed Jul 27, 2023
1 parent b404d90 commit 1b5d7ec
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions examples/serial/fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,38 @@ set_target_properties(smartredis-main PROPERTIES
# REQUIRED
# ${SMARTREDIS_LINK_MODE}
#)
add_library(smartredis-fortran ${SMARTREDIS_LINK_MODE} IMPORTED)
find_library(SR_FTN_LIB ${SMARTREDIS_FORTRAN_LIB}
PATHS ${SMARTREDIS_INSTALL_PATH}/lib NO_DEFAULT_PATH
REQUIRED
${SMARTREDIS_LINK_MODE}
)
set_target_properties(smartredis-fortranmain PROPERTIES
IMPORTED_LOCATION ${SR_FTN_LIB}
)

# Extras for static builds
if (STATIC_BUILD)
# Mark that SmartRedis requires the C++ linker
set_target_properties(smartredis-main PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
)
set_target_properties(smartredis-fortran PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "FORTRAN"
)

# Static builds have an extra dependency on the Pthreads library
find_package(Threads REQUIRED)
set(SMARTREDIS_LIBRARIES
# ${SR_LIB}
smartredis-main
${SR_FTN_LIB}
smartredis-fortran
Threads::Threads
)
else()
# Shared builds only need the SmartRedis libraries
set(SMARTREDIS_LIBRARIES
# ${SR_LIB}
smartredis-main
${SR_FTN_LIB}
smartredis-fortran
)
endif()

Expand Down

0 comments on commit 1b5d7ec

Please sign in to comment.