From df8b21c6ec3152226cb21284daf03b283be6f3f0 Mon Sep 17 00:00:00 2001 From: Terry Cojean Date: Thu, 6 Apr 2023 13:22:41 +0200 Subject: [PATCH] Adapt hwloc to the new scheme --- third_party/hwloc/CMakeLists.txt | 20 ++++++++------------ third_party/papi_sde/CMakeLists.txt | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/third_party/hwloc/CMakeLists.txt b/third_party/hwloc/CMakeLists.txt index f86d6bf0e5b..5534c07f4f2 100644 --- a/third_party/hwloc/CMakeLists.txt +++ b/third_party/hwloc/CMakeLists.txt @@ -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}") diff --git a/third_party/papi_sde/CMakeLists.txt b/third_party/papi_sde/CMakeLists.txt index f9866d1b553..4b58e368662 100644 --- a/third_party/papi_sde/CMakeLists.txt +++ b/third_party/papi_sde/CMakeLists.txt @@ -5,8 +5,8 @@ ginkgo_load_and_configure_package(papi_external "SHA1=540c18a14eeafb83cd60cbbf0a96706111dbff3b" "${TPL_PAPI_PATH}/src" "./configure" "--prefix=${TPL_PAPI_PATH}/install" - "--with-components=sde" "--with-libsde=yes" "--with-tests=no" - "--with-static-lib=no" "--with-shared-lib=yes" + "--with-components=sde" "--with-libsde=yes" "--with-tests=no" + "--with-static-lib=no" "--with-shared-lib=yes" ) add_library(PAPI SHARED IMPORTED GLOBAL)