Skip to content

Commit 8b7da9c

Browse files
committed
Remove all HINTS from find_file() in FindLIBHWLOC.cmake
CMAKE_PREFIX_PATH can contain many paths separated with semicolon, so using the expressions like: ${CMAKE_PREFIX_PATH}/include or ${CMAKE_PREFIX_PATH}/bin is incorrect, because a subdirectory would be appended only to the last path. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 1ffccf8 commit 8b7da9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/FindLIBHWLOC.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ message(STATUS "Checking for module 'libhwloc' using find_library()")
77
find_library(LIBHWLOC_LIBRARY NAMES libhwloc hwloc)
88
set(LIBHWLOC_LIBRARIES ${LIBHWLOC_LIBRARY})
99

10-
find_file(LIBHWLOC_HEADER NAMES hwloc.h HINTS /usr/include/ ${CMAKE_PREFIX_PATH}/include)
10+
find_file(LIBHWLOC_HEADER NAMES hwloc.h)
1111
get_filename_component(LIBHWLOC_INCLUDE_DIR ${LIBHWLOC_HEADER} DIRECTORY)
1212
set(LIBHWLOC_INCLUDE_DIRS ${LIBHWLOC_INCLUDE_DIR})
1313

1414
if(WINDOWS)
15-
find_file(LIBHWLOC_DLL NAMES hwloc-15.dll libhwloc-15.dll HINTS ${CMAKE_PREFIX_PATH}/bin)
15+
find_file(LIBHWLOC_DLL NAMES "bin/hwloc-15.dll" "bin/libhwloc-15.dll")
1616
get_filename_component(LIBHWLOC_DLL_DIR ${LIBHWLOC_DLL} DIRECTORY)
1717
set(LIBHWLOC_DLL_DIRS ${LIBHWLOC_DLL_DIR})
1818
endif()

0 commit comments

Comments
 (0)