Skip to content

Commit 23e7ece

Browse files
committed
Support building shared libs
Fixes #245
1 parent 67c6f94 commit 23e7ece

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/mpi/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ endif()
1717

1818
add_library(caf_mpi mpi_caf.c ../common/caf_auxiliary.c ../extensions/opencoarrays.F90)
1919

20+
set_target_properties ( caf_mpi
21+
PROPERTIES
22+
SOVERSION ${PROJECT_VERSION.MAJOR}.${PROJECT_VERSION.MINOR}
23+
VERSION ${PROJECT_VERSION}
24+
)
25+
26+
2027
target_include_directories(caf_mpi PRIVATE ${MPI_C_INCLUDE_PATH})
2128
if (gfortran_compiler)
2229
target_compile_options(caf_mpi INTERFACE -fcoarray=lib)
@@ -26,6 +33,7 @@ include_directories(${CMAKE_BINARY_DIR}/mod)
2633

2734
install(TARGETS caf_mpi EXPORT OpenCoarraysTargets
2835
ARCHIVE DESTINATION lib
36+
LIBRARY DESTINATION lib
2937
)
3038
install(DIRECTORY ${CMAKE_BINARY_DIR}/mod DESTINATION .)
3139

0 commit comments

Comments
 (0)