You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
863 B

3 months ago
  1. # Try to find HWLOC
  2. # Once done this will define:
  3. # - HWLOC_FOUND - True if the system has HWLOC
  4. # - HWLOC_INCLUDE_DIRS - include directories for compiling
  5. # - HWLOC_LIBRARIES - libraries for linking
  6. # - HWLOC_DEFINITIONS - cflags suggested by pkg-config
  7. find_package(PkgConfig)
  8. pkg_check_modules(PC_HWLOC QUIET hwloc)
  9. set(HWLOC_DEFINITIONS ${PC_HWLOC_FLAGS_OTHER})
  10. find_path(HWLOC_INCLUDE_DIR hwloc.h
  11. HINTS ${PC_HWLOC_INCLUDEDIR} ${PC_HWLOC_INCLUDE_DIRS})
  12. find_library(HWLOC_LIBRARIES NAMES hwloc
  13. HINTS ${PC_HWLOC_LIBDIR} ${PC_HWLOC_LIBRARY_DIRS})
  14. include(FindPackageHandleStandardArgs)
  15. # handle the QUIETLY and REQUIRED arguments and set HWLOC_FOUND to TRUE
  16. # if all listed variables are TRUE
  17. find_package_handle_standard_args(HWLOC DEFAULT_MSG HWLOC_LIBRARIES HWLOC_INCLUDE_DIR)
  18. mark_as_advanced(HWLOC_INCLUDE_DIR HWLOC_LIBRARIES)