-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
message(STATUS "Configuring and building HWLOC") | ||
set(TPL_HWLOC_PATH "${PROJECT_BINARY_DIR}/third_party/hwloc") | ||
set(TPL_HWLOC_PATH "${PROJECT_BINARY_DIR}/third_party/hwloc/src") | ||
ginkgo_load_and_configure_package(hwloc_external "https://download.open-mpi.org/release/hwloc/v2.4/hwloc-2.4.1.tar.gz" | ||
"SHA1=b94950e8958e1125ca75ecac0bc0259ee3d108c4" | ||
"" | ||
"${TPL_HWLOC_PATH}/src/configure" "--disable-nvml" "--disable-cuda" "--disable-rsmi" | ||
"${TPL_HWLOC_PATH}" | ||
"./configure" "--prefix=${TPL_HWLOC_PATH}/install" | ||
"--disable-nvml" "--disable-cuda" "--disable-rsmi" | ||
) | ||
|
||
add_library(hwloc SHARED IMPORTED GLOBAL) | ||
add_dependencies(hwloc hwloc_external) | ||
file(MAKE_DIRECTORY ${TPL_HWLOC_PATH}/lib/) | ||
file(GLOB HWLOC_LIBS "${TPL_HWLOC_PATH}/build/hwloc/.libs/libhwloc.so*") | ||
configure_file("${TPL_HWLOC_PATH}/build/include/hwloc/autogen/config.h" "${TPL_HWLOC_PATH}/src/include/hwloc/autogen/config.h" COPYONLY) | ||
foreach(lib ${HWLOC_LIBS}) | ||
get_filename_component(lib_name ${lib} NAME) | ||
configure_file("${lib}" "${TPL_HWLOC_PATH}/lib/${lib_name}" COPYONLY) | ||
endforeach() | ||
# NOTE: if changing this (e.g. to `.a`), please update the special case in | ||
# `cmake/information_helpers.cmake` | ||
set(HWLOC_LIBRARIES "${TPL_HWLOC_PATH}/lib/libhwloc.so" CACHE FILEPATH "The path to HWLOC library libhwloc.so" FORCE) | ||
set(HWLOC_INCLUDE_DIRS "${TPL_HWLOC_PATH}/src/include" CACHE PATH "The directory containing the hwloc header, hwloc.h" FORCE) | ||
set(HWLOC_LIBRARIES "${TPL_HWLOC_PATH}/install/lib/libhwloc.so" | ||
CACHE FILEPATH "The path to HWLOC library libhwloc.so" FORCE) | ||
set(HWLOC_INCLUDE_DIRS "${TPL_HWLOC_PATH}/install/include" | ||
CACHE PATH "The directory containing the hwloc header, hwloc.h" FORCE) | ||
set_target_properties(hwloc PROPERTIES IMPORTED_LOCATION ${HWLOC_LIBRARIES}) | ||
set_target_properties(hwloc PROPERTIES INTERFACE_LINK_LIBRARIES ${HWLOC_LIBRARIES}) | ||
set_target_properties(hwloc PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HWLOC_INCLUDE_DIRS}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters