Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ add_library(mpi_advance
)
target_link_libraries(mpi_advance PUBLIC ${EXTERNAL_LIBS})

install(TARGETS mpi_advance
install(TARGETS mpi_advance
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)

install(FILES src/mpi_advance.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(FILES ${utils_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/utils)
Expand All @@ -123,4 +124,26 @@ endif()

add_subdirectory(benchmarks)

### Installation Requirements for Spack Package ###
include(CMakePackageConfigHelpers)

# Install the actual target(s) and register them for export
install(TARGETS mpi_advance
EXPORT mpiadvanceTargets
DESTINATION lib)

# Export the targets into a CMake package
install(EXPORT mpiadvanceTargets
NAMESPACE mpiadvance::
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do MPIAdvance:: as the namespace?

DESTINATION lib/cmake/mpiadvance)

configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/mpiadvanceConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/mpiadvanceConfig.cmake"
INSTALL_DESTINATION lib/cmake/mpiadvance)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind making this install to share/mpiadvance?


install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/mpiadvanceConfig.cmake"
DESTINATION lib/cmake/mpiadvance)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here as the configure_package_config_file

############## End of Spack Section ################

Loading