Skip to content

Commit

Permalink
apply review suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Yuhsiang M. Tsai <[email protected]>
  • Loading branch information
upsj and yhmtsai committed Jan 10, 2020
1 parent c38d46b commit 020b568
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions cmake/autodetect_executors.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ find_package(OpenMP)
include(CheckLanguage)
check_language(CUDA)

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

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

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

0 comments on commit 020b568

Please sign in to comment.