Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/petsc-submodule' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipFackler committed Nov 26, 2024
2 parents 5e4961d + c102d60 commit 5d6964c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CMake/BuildPETSc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ endif()
if(NOT HDF5_FOUND)
list(APPEND __build_opts --get-hdf5)
message(STATUS " - build HDF5")
set(HDF5_ROOT "${__external_bin_dir}/petsc_install")
endif()
if(NOT Boost_FOUND)
list(APPEND __build_opts --get-boost)
message(STATUS " - build Boost")
if(NOT Xolotl_BUILD_PETSC_DEBUG)
set(Boost_USE_DEBUG_RUNTIME OFF CACHE INTERNAL "")
endif()
endif()
if(NOT LAPACK_FOUND)
list(APPEND __build_opts --get-lapack)
Expand Down Expand Up @@ -119,7 +123,8 @@ if(NOT ${__build_ret} EQUAL 0)
)
endif()

list(APPEND CMAKE_PREFIX_PATH ${__external_bin_dir}/petsc_install)
list(APPEND CMAKE_PREFIX_PATH "${__external_bin_dir}/petsc_install")
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE PATH "" FORCE)

## Don't build when re-running CMake unless the user specifies this again
set(Xolotl_BUILD_PETSC OFF CACHE PATH "" FORCE)
7 changes: 4 additions & 3 deletions scripts/build_petsc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ do
_petsc_extra_args="${_petsc_extra_args} --download-boost"
;;
--get-hdf5)
_petsc_extra_args="${_petsc_extra_args} --download-hdf5"
_petsc_extra_args="${_petsc_extra_args} \
--download-hdf5 \
--download-hdf5-configure-arguments=--enable-parallel"
;;
--get-hypre)
_petsc_extra_args="${_petsc_extra_args} --download-hypre"
Expand Down Expand Up @@ -146,10 +148,9 @@ fi
_conf_cmd="./configure \
${_petsc_dir_arch_set} \
${_prefix_arg} \
--with-cc=mpicc \
--with-cxx=mpicxx \
--with-fc=0 \
--with-cuda=${_use_cuda} \
--with-mpi \
--with-openmp=${_use_omp} \
--with-debugging=${_debug} \
--with-shared-libraries \
Expand Down
5 changes: 4 additions & 1 deletion xolotl/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ target_link_libraries(xolotlIO PUBLIC
${HDF5_LIBRARIES}
)
target_include_directories(xolotlIO PUBLIC
${HDF5_INCLUDE_DIR}
$<BUILD_INTERFACE:${HDF5_INCLUDE_DIR}>
$<BUILD_INTERFACE:${XOLOTL_IO_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>
)
Expand All @@ -46,4 +46,7 @@ set_target_properties(xolotlIO PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
)

get_target_property(__io_iid xolotlIO INTERFACE_INCLUDE_DIRECTORIES)
message("xolotlIO IIDs: ${__io_iid}")

install(TARGETS xolotlIO EXPORT Xolotl LIBRARY DESTINATION lib)

0 comments on commit 5d6964c

Please sign in to comment.