Skip to content

Commit eec6303

Browse files
committed
Fix missing install of opencoarrays.mod
1 parent b378d8c commit eec6303

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/mpi/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ set_target_properties(opencoarrays_mod
126126
Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/${mod_dir_tail}"
127127
POSITION_INDEPENDENT_CODE TRUE)
128128

129-
130129
add_library(caf_mpi SHARED mpi_caf.c ../common/caf_auxiliary.c $<TARGET_OBJECTS:opencoarrays_mod>)
131130
add_library(caf_mpi_static STATIC mpi_caf.c ../common/caf_auxiliary.c $<TARGET_OBJECTS:opencoarrays_mod>)
132131
target_link_libraries(caf_mpi PRIVATE ${MPI_C_LIBRARIES} ${MPI_Fortran_LIBRARIES})
@@ -147,6 +146,15 @@ set_target_properties ( caf_mpi
147146
# VERSION ${PROJECT_VERSION}
148147
)
149148

149+
# Create a symlink in the include dir
150+
add_custom_command(TARGET caf_mpi
151+
POST_BUILD
152+
COMMAND ${CMAKE_COMMAND} -E create_symlink "./${mod_dir_tail}/opencoarrays.mod" "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/opencaorrays.mod"
153+
COMMENT "Creating symlink ${CMAKE_INSTALL_INCLUDEDIR}/opencaorrays.mod --> ${CMAKE_INSTALL_INCLUDEDIR}/${mod_dir_tail}/opencoarrays.mod")
154+
155+
install(DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
156+
FILES_MATCHING PATTERN "*.mod")
157+
150158
set_target_properties( caf_mpi_static
151159
PROPERTIES
152160
SOVERSION ${CAF_SO_VERSION}

0 commit comments

Comments
 (0)