Skip to content

Commit

Permalink
Use pkgconfig libelf
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Feb 23, 2024
1 parent 3714cbb commit 9f4e8e7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@ include_directories(${Boost_INCLUDE_DIRS})
message("Boost: ${Boost_LIBRARIES}")

# Libelf
find_package(LibElf REQUIRED)
if(LibElf_FOUND)
message(STATUS "found libelf at ${LibElf_INCLUDE_DIRS}")
endif()
pkg_check_modules(libelf REQUIRED libelf)
message(STATUS "found libelf at ${libelf_INCLUDE_DIRS}")
include_directories(${libelf_INCLUDE_DIRS})

# HDF5
if(HERMES_ENABLE_VFD)
Expand Down
3 changes: 2 additions & 1 deletion hermes_adapters/mpiio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ set(INTERCEPTOR_DEPS
add_library(hermes_mpiio SHARED
${CMAKE_CURRENT_SOURCE_DIR}/mpiio_api.cc)
add_dependencies(hermes_mpiio ${INTERCEPTOR_DEPS})
target_link_libraries(hermes_mpiio MPI::MPI_CXX stdc++fs elf dl ${INTERCEPTOR_DEPS})
target_link_libraries(hermes_mpiio
MPI::MPI_CXX stdc++fs ${libelf_LIBRARIES} dl ${INTERCEPTOR_DEPS})

#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install
Expand Down
2 changes: 1 addition & 1 deletion hermes_adapters/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(INTERCEPTOR_DEPS
add_library(hermes_posix SHARED
${CMAKE_CURRENT_SOURCE_DIR}/posix_api.cc)
add_dependencies(hermes_posix ${INTERCEPTOR_DEPS})
target_link_libraries(hermes_posix MPI::MPI_CXX stdc++fs elf dl ${INTERCEPTOR_DEPS})
target_link_libraries(hermes_posix MPI::MPI_CXX stdc++fs ${libelf_LIBRARIES} dl ${INTERCEPTOR_DEPS})

#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install
Expand Down
2 changes: 1 addition & 1 deletion hermes_adapters/stdio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(INTERCEPTOR_DEPS
add_library(hermes_stdio SHARED
${CMAKE_CURRENT_SOURCE_DIR}/stdio_api.cc)
add_dependencies(hermes_stdio ${INTERCEPTOR_DEPS})
target_link_libraries(hermes_stdio MPI::MPI_CXX stdc++fs elf dl ${INTERCEPTOR_DEPS})
target_link_libraries(hermes_stdio MPI::MPI_CXX stdc++fs ${libelf_LIBRARIES} dl ${INTERCEPTOR_DEPS})

#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install
Expand Down

0 comments on commit 9f4e8e7

Please sign in to comment.