Skip to content

Commit

Permalink
Merge some modifications to CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Jan 31, 2024
2 parents 131eca1 + 38115f3 commit f312ba4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.23)
project(kokkos-fft LANGUAGES CXX)
cmake_minimum_required(VERSION 3.22)
project(KokkosFFT LANGUAGES CXX)

# Add cmake helpers for FFTW
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# Options
option(BUILD_EXAMPLES "Build kokkos-fft examples" ON)
option(KokkosFFT_ENABLE_HOST_AND_DEVICE "Enable fft on both host and device" OFF)
option(BUILD_EXAMPLES "Build KokkosFFT examples" ON)
option(KokkosFFT_ENABLE_HOST_AND_DEVICE "Enable FFT on both host and device" OFF)
option(KokkosFFT_INTERNAL_Kokkos "Build internal Kokkos instead of relying on external one" OFF)
option(KokkosFFT_ENABLE_BENCHMARK "Build benchmarks for KokkosFFT" OFF)

Expand Down Expand Up @@ -72,7 +72,7 @@ include(GNUInstallDirs)
set(LIBDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
set(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
set(INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/${LIBDIR})
set(KokkosFFT_EXPORT_TARGET "KokkosFFT-Targets")
set(KokkosFFT_EXPORT_TARGET "${PROJECT_NAME}-Targets")

add_subdirectory(common)
add_subdirectory(fft)
Expand Down
7 changes: 6 additions & 1 deletion cmake/KokkosFFTConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ elseif(@Kokkos_ENABLE_HIP@)
if(@KokkosFFT_ENABLE_HOST_AND_DEVICE@)
find_dependency(FFTW MODULE)
endif()
elseif(@Kokkos_ENABLE_SYCL@)
find_dependency(MKL COMPONENTS SYCL)
if(@KokkosFFT_ENABLE_HOST_AND_DEVICE@)
find_dependency(FFTW MODULE)
endif()
elseif(@Kokkos_ENABLE_OPENMP@)
find_dependency(FFTW MODULE)
elseif(@Kokkos_ENABLE_SERIAL@)
Expand All @@ -26,4 +31,4 @@ endif()

include(${KokkosFFT_TARGET_FILE})

check_required_components(KokkosFFT)
check_required_components(KokkosFFT)
4 changes: 2 additions & 2 deletions install_test/bin/install_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export Kokkos_DIR=${KOKKOS_INSTALL_PREFIX}/lib/cmake/Kokkos
export KOKKOS_BUILD_DIR=build_Kokkos_${TARGET}

export KOKKOSFFT_INSTALL_PREFIX=${ROOT_DIR}/usr/local/kokkosFFT_${TARGET}
export KokkosFFT_DIR=${KOKKOSFFT_INSTALL_PREFIX}/lib/cmake/kokkos-fft
export KokkosFFT_DIR=${KOKKOSFFT_INSTALL_PREFIX}/lib/cmake/KokkosFFT
export KOKKOSFFT_BUILD_DIR=build_KokkosFFT_${TARGET}

export EXAMPLE_BUILD_DIR=build_example_${TARGET}
Expand Down Expand Up @@ -45,4 +45,4 @@ if [ $? -eq 0 ]; then
else
echo "*** install test: build FAILED ***"
exit 1;
fi
fi
4 changes: 2 additions & 2 deletions install_test/bin/install_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export Kokkos_DIR=${KOKKOS_INSTALL_PREFIX}/lib/cmake/Kokkos
export KOKKOS_BUILD_DIR=build_Kokkos_${KOKKOS_TARGET}

export KOKKOSFFT_INSTALL_PREFIX=${ROOT_DIR}/usr/local/kokkosFFT_${TARGET}
export KokkosFFT_DIR=${KOKKOSFFT_INSTALL_PREFIX}/lib/cmake/kokkos-fft
export KokkosFFT_DIR=${KOKKOSFFT_INSTALL_PREFIX}/lib/cmake/KokkosFFT
export KOKKOSFFT_BUILD_DIR=build_KokkosFFT_${TARGET}

export EXAMPLE_BUILD_DIR=build_example_${TARGET}
Expand Down Expand Up @@ -61,4 +61,4 @@ if [ $? -eq 0 ]; then
else
echo "*** install test: build FAILED ***"
exit 1;
fi
fi
4 changes: 2 additions & 2 deletions install_test/bin/install_hip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export Kokkos_DIR=${KOKKOS_INSTALL_PREFIX}/lib/cmake/Kokkos
export KOKKOS_BUILD_DIR=build_Kokkos_${KOKKOS_TARGET}

export KOKKOSFFT_INSTALL_PREFIX=${ROOT_DIR}/usr/local/kokkosFFT_${TARGET}
export KokkosFFT_DIR=${KOKKOSFFT_INSTALL_PREFIX}/lib/cmake/kokkos-fft
export KokkosFFT_DIR=${KOKKOSFFT_INSTALL_PREFIX}/lib/cmake/KokkosFFT
export KOKKOSFFT_BUILD_DIR=build_KokkosFFT_${TARGET}

export EXAMPLE_BUILD_DIR=build_example_${TARGET}
Expand Down Expand Up @@ -61,4 +61,4 @@ if [ $? -eq 0 ]; then
else
echo "*** install test: build FAILED ***"
exit 1;
fi
fi

0 comments on commit f312ba4

Please sign in to comment.