Skip to content

Commit

Permalink
Fix side CMake issues.
Browse files Browse the repository at this point in the history
+ Make HIP on CUDA platform not do the CMAKE_CUDA_COMPILER_VERSION
  check.
+ Fix an important bug affecting the CMAKE_REQUIRED_LIBRARIES management
  of build_type_helpers.cmake.

Co-authored-by: Yuhsiang Tsai <yhmtsai@gmail.com>
Co-authored-by: Tobias Ribizel <ribizel@kit.edu>
  • Loading branch information
3 people committed Apr 29, 2021
1 parent 303e833 commit 436c3c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cmake/build_type_helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ foreach(_LANG IN LISTS ENABLED_LANGUAGES ITEMS "HIP")
${PROJECT_NAME}_${_LANG}_${_TYPE}_SUPPORTED)
else()
if(DEFINED ${PROJECT_NAME}_${_LANG}_${_TYPE}_SUPPORTED)
message(STATUS "Skipping ${_LANG}, not supported by build_type.cmake script")
message(STATUS "Skipping ${_LANG}, not supported by build_type_helpers.cmake script")
endif()
set(${PROJECT_NAME}_${_LANG}_${_TYPE}_SUPPORTED FALSE)
continue()
endif()
if(${PROJECT_NAME}_${_LANG}_${_TYPE}_SUPPORTED)
if(_LANG STREQUAL "HIP" AND GINKGO_HIP_PLATFORM MATCHES "${HIP_PLATFORM_NVIDIA_REGEX}")
Expand Down
2 changes: 1 addition & 1 deletion hip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (GINKGO_HIP_PLATFORM MATCHES "${HIP_PLATFORM_NVIDIA_REGEX}"
AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.2)
AND GINKGO_BUILD_CUDA AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.2)
message(FATAL_ERROR "Ginkgo HIP backend requires CUDA >= 9.2.")
endif()

Expand Down

0 comments on commit 436c3c9

Please sign in to comment.