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 b18f3b7 commit 67de648
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 29 deletions.
29 changes: 18 additions & 11 deletions examples/parallel/fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,28 @@ set_target_properties(smartredis-fortran PROPERTIES

# 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"
)
if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
# For Intel, don't set languages so that CMake will use the Fortran linker (default)

# Add the stdc++ linker flag
set(CMAKE_EXE_LINKER_FLAGS "-lstdc++ ${CMAKE_EXE_LINKER_FLAGS}")
else() # Solution tested with GNU
# 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"
)
endif()

# Static builds have an extra dependency on the Pthreads library
find_package(Threads REQUIRED)
set(SMARTREDIS_LIBRARIES
find_package(Threads REQUIRED)
set(SMARTREDIS_LIBRARIES
smartredis-fortran
smartredis-main
Threads::Threads
)
Threads::Threads
)
else()
# Shared builds only need the SmartRedis libraries
set(SMARTREDIS_LIBRARIES
Expand Down
2 changes: 0 additions & 2 deletions examples/serial/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ if (STATIC_BUILD)
# Static builds have an extra dependency on the Pthreads library
find_package(Threads REQUIRED)
set(SMARTREDIS_LIBRARIES
# ${SR_LIB}
smartredis-main
Threads::Threads
)
else()
# Shared builds only need the SmartRedis library
set(SMARTREDIS_LIBRARIES
# ${SR_LIB}
smartredis-main
)
endif()
Expand Down
39 changes: 23 additions & 16 deletions examples/serial/fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,33 @@ set_target_properties(smartredis-fortran PROPERTIES

# 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"
)
if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
# For Intel, don't set languages so that CMake will use the Fortran linker (default)

# Static builds have an extra dependency on the Pthreads library
find_package(Threads REQUIRED)
set(SMARTREDIS_LIBRARIES
smartredis-fortran
smartredis-main
Threads::Threads
)
# Add the stdc++ linker flag
set(CMAKE_EXE_LINKER_FLAGS "-lstdc++ ${CMAKE_EXE_LINKER_FLAGS}")
else() # Solution tested with GNU
# 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"
)
endif()

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

Expand Down

0 comments on commit 67de648

Please sign in to comment.