vcpkg/ports/hwloc/portfile.cmake
Alexander Neumann fdac8bfc1b
[hwloc] Update to 2.5 and switch to make (#20905)
* hwloc try and error

* hwloc fix build.

* format manifest

* version stuff

* remove supports expression. Copy COPYING from src dir

* format manifest

* overwrite version

* update ci baseline
hpx uses _mm_pause which seems to be undefined on arm64
maybe hpx requires a supports field?

* switch to version in manifest

* version stuff

* add maintainer

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* version stuff

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2021-10-27 23:05:10 -07:00

55 lines
1.7 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO open-mpi/hwloc
REF 5e185ccfff2728fa351cea41f6d9fefebfb88078 # hwloc-2.5.0
SHA512 96f6421c40eede3a3c273a1ffa06accc43767421d5fb7b402a83caea1ef1a3bb8282c08ed94bc696296f37f3df80cd86403dac1012f2218b674569c8afcf3de9
PATCHES fix_wrong_ifdef.patch
fix_shared_win_build.patch
)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(OPTIONS ac_cv_prog_cc_c99= # To avoid the compiler check for C99 which will fail for MSVC
--disable-plugin-dlopen)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND OPTIONS "HWLOC_LDFLAGS=-no-undefined")
endif()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
${OPTIONS}
--disable-libxml2
--disable-opencl
--disable-cairo
--disable-cuda
--disable-libudev
--disable-levelzero
--disable-nvml
--disable-rsmi
--disable-pci
#--disable-cpuid
#--disable-picky
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/COPYING.txt"
"${CURRENT_PACKAGES_DIR}/debug/README.txt"
"${CURRENT_PACKAGES_DIR}/debug/NEWS.txt"
"${CURRENT_PACKAGES_DIR}/COPYING.txt"
"${CURRENT_PACKAGES_DIR}/README.txt"
"${CURRENT_PACKAGES_DIR}/NEWS.txt"
)