Skip to content

Commit

Permalink
Fix enabling OpenMP with HIP and "compile as CMake language"
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed May 1, 2024
1 parent 4f416f3 commit f699a2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/kokkos_tpls.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ IF (Kokkos_ENABLE_OPENMP)
ELSE()
KOKKOS_EXPORT_CMAKE_TPL(OpenMP REQUIRED COMPONENTS CXX)
ENDIF()
IF(Kokkos_ENABLE_HIP AND KOKKOS_COMPILE_LANGUAGE STREQUAL HIP)
GLOBAL_APPEND(KOKKOS_AMDGPU_OPTIONS ${OpenMP_CXX_FLAGS})
ENDIF()
ENDIF()

#Convert list to newlines (which CMake doesn't always like in cache variables)
Expand Down

0 comments on commit f699a2c

Please sign in to comment.