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 a38b4e9 commit 863cfc9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions examples/parallel/fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,40 +55,42 @@ 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-fortran 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
smartredis-fortran
Threads::Threads
)
else()
# Shared builds only need the SmartRedis libraries
set(SMARTREDIS_LIBRARIES
# ${SR_LIB}
smartredis-main
smartredis-fortran
smartredis-main
${SR_FTN_LIB}
)
endif()

set(SMARTREDIS_LIBRARIES
${SR_LIB}
${SR_FTN_LIB}
)

# Define include directories for header files
include_directories(SYSTEM
/usr/local/include
Expand Down

0 comments on commit 863cfc9

Please sign in to comment.