Commit a2aadab9 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

add path to lib if cmake var exist before testing hwloc functions

parent 0be78ab2
......@@ -321,6 +321,18 @@ endif()
if (HWLOC_FOUND)
set(HWLOC_SAVE_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
list(APPEND CMAKE_REQUIRED_INCLUDES ${HWLOC_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES)
if (HWLOC_LIBRARY_DIRS)
set (LIBDIR ${HWLOC_LIBRARY_DIRS})
elseif(HWLOC_LIBDIR)
set (LIBDIR ${HWLOC_LIBDIR})
endif()
if (LIBDIR)
foreach(lib_dir ${LIBDIR})
list(APPEND CMAKE_REQUIRED_LIBRARIES "-L${lib_dir}")
endforeach()
endif()
string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
# test headers to guess the version
check_struct_has_member( "struct hwloc_obj" parent hwloc.h HAVE_HWLOC_PARENT_MEMBER )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment