set(GINKGO_HAS_OMP OFF)
set(GINKGO_HAS_CUDA OFF)
set(GINKGO_HAS_HIP OFF)
find_package(OpenMP)
include(CheckLanguage)
check_language(CUDA)

if(OpenMP_CXX_FOUND)
    if(NOT DEFINED GINKGO_BUILD_OMP)
        message(STATUS "Enabling OpenMP executor")
    endif()
    set(GINKGO_HAS_OMP ON)
endif()

if(CMAKE_CUDA_COMPILER)
    if(NOT DEFINED GINKGO_BUILD_CUDA)
        message(STATUS "Enabling CUDA executor")
    endif()
    set(GINKGO_HAS_CUDA ON)
endif()

if(GINKGO_HIPCONFIG_PATH)
    if(NOT DEFINED GINKGO_BUILD_HIP)
        message(STATUS "Enabling HIP executor")
    endif()
    set(GINKGO_HAS_HIP ON)
endif()
