[hwloc] Added utility hwloc-info (#4279)

* Added version number to project() invocation

* Added URL to project() invocation

* added hwloc-info target and install()

* Removed URL (oops), fixed hwloc-info when using shared libs

* [hwloc] Bump control version. Don't package debug version of hwloc-info.
This commit is contained in:
Nagy-Egri Máté Ferenc 2018-10-13 00:07:30 +02:00 committed by Robert Schumacher
parent 064fe93191
commit 7a3cc8db7f
3 changed files with 24 additions and 4 deletions

View File

@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.0)
project(hwloc C)
project(hwloc
LANGUAGES C
VERSION 1.11.7)
configure_file(contrib/windows/hwloc_config.h include/hwloc/autogen/config.h COPYONLY)
configure_file(contrib/windows/static-components.h include/static-components.h COPYONLY)
@ -36,14 +38,30 @@ add_library(libhwloc
src/dolib.c)
set_target_properties(libhwloc PROPERTIES DEFINE_SYMBOL _USRDLL)
target_include_directories(libhwloc PRIVATE ./include ./src ${CMAKE_CURRENT_BINARY_DIR}/include)
target_compile_definitions(libhwloc PRIVATE _CRT_SECURE_NO_WARNINGS)
add_executable(hwloc-info
utils/hwloc/hwloc-info.c)
target_link_libraries(hwloc-info PRIVATE libhwloc)
foreach(Target IN ITEMS libhwloc hwloc-info)
target_include_directories(${Target} PRIVATE ./include ./src ${CMAKE_CURRENT_BINARY_DIR}/include)
target_compile_definitions(${Target} PRIVATE _CRT_SECURE_NO_WARNINGS)
endforeach(Target)
install(TARGETS libhwloc
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)
install(TARGETS hwloc-info
RUNTIME DESTINATION tools/hwloc)
if(BUILD_SHARED_LIBS)
install(TARGETS libhwloc
RUNTIME DESTINATION tools/hwloc)
endif(BUILD_SHARED_LIBS)
if(NOT HWLOC_SKIP_INCLUDES)
install(FILES include/hwloc.h DESTINATION include)
install(DIRECTORY include/hwloc DESTINATION include FILES_MATCHING PATTERN "*.h")

View File

@ -1,4 +1,4 @@
Source: hwloc
Version: 1.11.7-2
Version: 1.11.7-3
Description: Portable Hardware Locality (hwloc)
The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs.

View File

@ -28,6 +28,8 @@ else()
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h "${PUBLIC_CONFIG_H}")
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/tools)
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hwloc)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/hwloc/COPYING ${CURRENT_PACKAGES_DIR}/share/hwloc/copyright)