From f3840ffb1a2f4fa80d3099e67c5c4c65f269ba43 Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Fri, 26 Jan 2024 00:40:49 +0900 Subject: [PATCH] Test if Kokkos is already included --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index deb75fa9..f5b02b65 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,10 +11,8 @@ option(KokkosFFT_INTERNAL_Kokkos "Build internal Kokkos instead of relying on ex if (NOT KokkosFFT_INTERNAL_Kokkos) # First check, Kokkos is added as subdirectory or not - if ("${KOKKOS_PATH}" STREQUAL "") + if(NOT TARGET Kokkos::kokkos) find_package(Kokkos REQUIRED) - else() - message(STATUS "Using Kokkos at ${KOKKOS_PATH}") endif() else () add_subdirectory(tpls/kokkos)