Skip to content

Commit 6d9baf4

Browse files
committed
Add warning for missing autoreconf in hwloc fetch
1 parent e3d2929 commit 6d9baf4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,7 @@ else()
245245
)
246246
endif()
247247

248-
if(UMF_DISABLE_HWLOC)
249-
message(STATUS "hwloc is disabled, hence OS provider, memtargets, "
250-
"topology discovery, examples won't be available!")
251-
else()
248+
if(NOT UMF_DISABLE_HWLOC)
252249
if(NOT DEFINED UMF_HWLOC_REPO)
253250
set(UMF_HWLOC_REPO "https://github.com/open-mpi/hwloc.git")
254251
endif()
@@ -272,9 +269,20 @@ else()
272269
"${DLL_PATH_LIST};PATH=path_list_append:${LIBHWLOC_DLL_DIRS}")
273270
else()
274271
set(UMF_LINK_HWLOC_STATICALLY ON)
272+
find_program(AUTORECONF_EXECUTABLE autoreconf)
273+
if(NOT AUTORECONF_EXECUTABLE)
274+
message(WARNING "autoreconf is not installed. Disabling hwloc.")
275+
set(UMF_DISABLE_HWLOC ON CACHE BOOL "Disable hwloc due to missing autoreconf" FORCE)
276+
set(UMF_LINK_HWLOC_STATICALLY OFF CACHE BOOL "Disable static hwloc linking due to missing autoreconf" FORCE)
277+
endif()
275278
endif()
276279
endif()
280+
endif()
277281

282+
if(UMF_DISABLE_HWLOC)
283+
message(STATUS "hwloc is disabled, hence OS provider, memtargets, "
284+
"topology discovery, examples won't be available!")
285+
else()
278286
if(UMF_LINK_HWLOC_STATICALLY)
279287
message(
280288
STATUS

0 commit comments

Comments
 (0)