From 878fae15dd3b33d339e0b5602d1290a4fb12a85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Tue, 26 Aug 2025 17:17:07 +0200 Subject: [PATCH] [CMake] Fail early in configure, if autoreconf is missing It's required for hwloc static linking - in hwloc's configure step --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b81536019..ac77c61575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,7 +280,8 @@ if(UMF_LINK_HWLOC_STATICALLY) endif() message( - STATUS "Will fetch hwloc from ${UMF_HWLOC_REPO} (tag: ${UMF_HWLOC_TAG})" + STATUS + "Will fetch hwloc from ${UMF_HWLOC_REPO} (tag: ${UMF_HWLOC_TAG}) and link it statically" ) if(WINDOWS) @@ -309,6 +310,14 @@ if(UMF_LINK_HWLOC_STATICALLY) set(LIBHWLOC_INCLUDE_DIRS ${hwloc_targ_BINARY_DIR}/include) set(LIBHWLOC_FOUND TRUE) else() # not Windows + find_program(AUTORECONF_EXECUTABLE autoreconf) + if(NOT AUTORECONF_EXECUTABLE) + message( + FATAL_ERROR + "autoreconf is not installed, but it's needed in hwloc configure step. " + "Either install it, or set UMF_LINK_HWLOC_STATICALLY=OFF and install hwloc >= 2.3.0 in your system." + ) + endif() FetchContent_Declare( hwloc_targ GIT_REPOSITORY ${UMF_HWLOC_REPO}