diff --git a/CMakeLists.txt b/CMakeLists.txt index 48f89c5cb3b8d4488f05933bc80b7f6717bc2048..915b1d64e757d7b03ac93ab6123b4f76761bdb8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -686,9 +686,11 @@ if ( WALBERLA_BUILD_WITH_HIP ) if( CMAKE_HIP_COMPILER ) enable_language(HIP) + find_package(hip REQUIRED) # since waLBerla also supports CUDA we only use HIP on an AMD platform add_compile_definitions(__HIP_PLATFORM_AMD__) # include_directories(${HSA_HEADER}) + list (APPEND SERVICE_LIBS hip::host) else() message( FATAL_ERROR "HIP could not be found. Either make HIP available or disable WALBERLA_BUILD_WITH_HIP!" ) endif ( ) diff --git a/src/gpu/CMakeLists.txt b/src/gpu/CMakeLists.txt index 263650bbc0871c878a7c0e5c58d5f0d8d72f39d6..eb10f9ed10d7155d8d85253a25bf9c5e8e338bab 100644 --- a/src/gpu/CMakeLists.txt +++ b/src/gpu/CMakeLists.txt @@ -51,6 +51,13 @@ if (WALBERLA_BUILD_WITH_CUDA) ) endif (WALBERLA_BUILD_WITH_CUDA) +if (WALBERLA_BUILD_WITH_HIP) + target_link_libraries( walberla_gpu + Public + hip::host + ) +endif (WALBERLA_BUILD_WITH_HIP) + add_subdirectory( sweeps ) add_subdirectory( communication ) add_subdirectory( lbm )