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 <yhmtsai@gmail.com>
  • Loading branch information
upsj and yhmtsai committed Jan 9, 2020
1 parent 6f40445 commit 6346bb9
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions cmake/autodetect_executors.cmake
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 6346bb9

Please sign in to comment.