Skip to content

Commit 682c034

Browse files
igchorbratpiorka
authored andcommitted
Add option to change hwloc repo url and tag
1 parent eb821ba commit 682c034

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

CMakeLists.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ else()
100100
message(FATAL_ERROR "Unknown OS type")
101101
endif()
102102

103+
if(NOT DEFINED UMF_HWLOC_REPO)
104+
set(UMF_HWLOC_REPO "https://github.com/open-mpi/hwloc.git")
105+
endif()
106+
107+
if(NOT DEFINED UMF_HWLOC_TAG)
108+
set(UMF_HWLOC_TAG hwloc-2.10.0)
109+
endif()
110+
103111
if(NOT UMF_LINK_HWLOC_STATICALLY)
104112
if(NOT UMF_DISABLE_HWLOC)
105113
pkg_check_modules(LIBHWLOC hwloc>=2.3.0)
@@ -121,10 +129,13 @@ elseif(WINDOWS)
121129
set(HWLOC_ENABLE_TESTING OFF)
122130
set(HWLOC_SKIP_LSTOPO ON)
123131
set(HWLOC_SKIP_TOOLS ON)
132+
133+
message(STATUS "Will fetch hwloc from ${UMF_HWLOC_REPO}")
134+
124135
FetchContent_Declare(
125136
hwloc_targ
126-
GIT_REPOSITORY "https://github.com/open-mpi/hwloc.git"
127-
GIT_TAG hwloc-2.10.0
137+
GIT_REPOSITORY ${UMF_HWLOC_REPO}
138+
GIT_TAG ${UMF_HWLOC_TAG}
128139
SOURCE_SUBDIR contrib/windows-cmake/ FIND_PACKAGE_ARGS)
129140

130141
FetchContent_GetProperties(hwloc_targ)
@@ -142,10 +153,12 @@ elseif(WINDOWS)
142153
message(STATUS " LIBHWLOC_LIBRARY_DIRS = ${LIBHWLOC_LIBRARY_DIRS}")
143154
else()
144155
include(FetchContent)
156+
message(STATUS "Will fetch hwloc from ${UMF_HWLOC_REPO}")
157+
145158
FetchContent_Declare(
146159
hwloc_targ
147-
GIT_REPOSITORY "https://github.com/open-mpi/hwloc.git"
148-
GIT_TAG hwloc-2.10.0)
160+
GIT_REPOSITORY ${UMF_HWLOC_REPO}
161+
GIT_TAG ${UMF_HWLOC_TAG})
149162

150163
FetchContent_GetProperties(hwloc_targ)
151164
if(NOT hwloc_targ_POPULATED)

0 commit comments

Comments
 (0)