Skip to content

Commit

Permalink
Avoid building HWLoc more times than initial configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Shreyas Atre <[email protected]>
  • Loading branch information
SAtacker committed Jan 22, 2025
1 parent 1488045 commit faa12ed
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions cmake/HPX_SetupHwloc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,21 @@ else()
)
if(NOT HWLoc_POPULATED)
fetchcontent_populate(HWLoc)
execute_process(
COMMAND
sh -c
"cd ${FETCHCONTENT_BASE_DIR}/hwloc-src && ./configure --prefix=${FETCHCONTENT_BASE_DIR}/hwloc-installed && make -j && make install"
)
if(NOT Hwloc_BUILD_INSTALLED)
execute_process(
COMMAND
sh -c
"cd ${FETCHCONTENT_BASE_DIR}/hwloc-src && ./configure --prefix=${FETCHCONTENT_BASE_DIR}/hwloc-installed && make -j && make install"
)
set(Hwloc_BUILD_INSTALLED
TRUE
CACHE INTERNAL ""
)
else()
message(
"HWLoc is installed at ${FETCHCONTENT_BASE_DIR}/hwloc-installed"
)
endif()
endif()
set(HWLOC_ROOT "${FETCHCONTENT_BASE_DIR}/hwloc-installed")
set(Hwloc_INCLUDE_DIR
Expand Down

0 comments on commit faa12ed

Please sign in to comment.