Skip to content

Commit

Permalink
Merge pull request #359 from DARMA-tasking/358-use-correct-kokkos-var…
Browse files Browse the repository at this point in the history
…iable-for-magistrateconfigcmake

#358: Use correct `Kokkos` variable within `magistrateConfig.cmake` file
  • Loading branch information
lifflander authored Jul 15, 2024
2 parents 9ddefa7 + 3ca99ad commit a7f90d0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
22 changes: 11 additions & 11 deletions ci/build_against_vt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex

vt_source_dir="${1}"
vt_build_dir="${2}"
checkpoint_source_dir="${3}"
magistrate_source_dir="${3}"

mkdir -p "$vt_source_dir"
cd "$vt_source_dir"
Expand All @@ -30,20 +30,20 @@ mkdir -p "${vt_build_dir}"
cd "${vt_build_dir}"
rm -Rf ./*

export CHECKPOINT=${checkpoint_source_dir}
export CHECKPOINT_BUILD=${vt_build_dir}/checkpoint
mkdir -p "${CHECKPOINT_BUILD}"
cd "${CHECKPOINT_BUILD}"
export MAGISTRATE=${magistrate_source_dir}
export MAGISTRATE_BUILD=${vt_build_dir}/checkpoint
mkdir -p "${MAGISTRATE_BUILD}"
cd "${MAGISTRATE_BUILD}"
rm -Rf ./*
mkdir -p build
cd build
rm -Rf ./*
cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-DCMAKE_INSTALL_PREFIX="${CHECKPOINT_BUILD}/install" \
-Dcheckpoint_asan_enabled="${MAGISTRATE_ASAN_ENABLED:-1}" \
-Dcheckpoint_ubsan_enabled="${MAGISTRATE_UBSAN_ENABLED:-1}" \
-Dcheckpoint_serialization_error_checking_enabled="${MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED:-1}" \
"${CHECKPOINT}"
-DCMAKE_INSTALL_PREFIX="${MAGISTRATE_BUILD}/install" \
-Dmagistrate_asan_enabled="${MAGISTRATE_ASAN_ENABLED:-1}" \
-Dmagistrate_ubsan_enabled="${MAGISTRATE_UBSAN_ENABLED:-1}" \
-Dmagistrate_serialization_error_checking_enabled="${MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED:-1}" \
"${MAGISTRATE}"
cmake --build . --target install

if test "${VT_ZOLTAN_ENABLED:-0}" -eq 1
Expand Down Expand Up @@ -88,7 +88,7 @@ cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-DCMAKE_CXX_COMPILER="${CXX:-c++}" \
-DCMAKE_C_COMPILER="${CC:-cc}" \
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS:-}" \
-Dcheckpoint_ROOT="${CHECKPOINT_BUILD}/install" \
-Dmagistrate_ROOT="${MAGISTRATE_BUILD}/install" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:-}" \
-DCMAKE_INSTALL_PREFIX="${VT_BUILD}/install" \
-Dvt_ci_build="${VT_CI_BUILD:-1}" \
Expand Down
8 changes: 5 additions & 3 deletions cmake/magistrateConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ add_library(vt::lib::magistrate ALIAS vt::lib::checkpoint)
include(CMakeFindDependencyMacro)

if (@MAGISTRATE_HAS_KOKKOS_LIBRARY@)
set (kokkos_DIR @kokkos_DIR@)
find_dependency(kokkos REQUIRED HINTS @kokkos_DIR@ NAMES Kokkos)
set (Kokkos_DIR @Kokkos_DIR@)
set (Kokkos_ROOT @Kokkos_ROOT@)
find_dependency(kokkos REQUIRED HINTS @Kokkos_DIR@ @Kokkos_ROOT@ NAMES Kokkos)
endif()

if (@MAGISTRATE_HAS_KOKKOS_KERNELS_LIBRARY@)
set (KokkosKernels_DIR @KokkosKernels_DIR@)
find_dependency(KokkosKernels REQUIRED HINTS @KokkosKernels_DIR@ NAMES KokkosKernels)
set (KokkosKernels_ROOT @KokkosKernels_ROOT@)
find_dependency(KokkosKernels REQUIRED HINTS @KokkosKernels_DIR@ @KokkosKernels_ROOT@ NAMES KokkosKernels)
endif()

0 comments on commit a7f90d0

Please sign in to comment.