message: add HIP detection
diff: @@ -20,8 +20,20 @@ else()
  set(GINKGO_HAS_OMP OFF)
  endif()
  -# TODO: auto-detect HIP
  +if(NOT DEFINED HIP_PATH)
  + if(NOT DEFINED ENV{HIP_PATH})
  + set(HIP_PATH "/opt/rocm/hip" CACHE PATH "Path to which HIP has been installed")
  + set(ENV{HIP_PATH} ${HIP_PATH})
  + else()
  + set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to which HIP has been installed")
  + endif()
  +endif()
  +find_program(GINKGO_HIPCONFIG_PATH hipconfig HINTS "${HIP_PATH}/bin")
  +if(GINKGO_HIPCONFIG_PATH)
  + set(GINKGO_HAS_HIP ON)
  +else()
  set(GINKGO_HAS_HIP OFF)
  +endif()
  # Ginkgo configuration options
  option(GINKGO_DEVEL_TOOLS "Add development tools to the build system" ON)
  @@ -139,16 +151,6 @@ set(GINKGO_HIP_PLATFORM_NVCC 0)
  set(GINKGO_HIP_PLATFORM_HCC 0)
  if (GINKGO_BUILD_HIP)
  - if(NOT DEFINED HIP_PATH)
  - if(NOT DEFINED ENV{HIP_PATH})
  - set(HIP_PATH "/opt/rocm/hip" CACHE PATH "Path to which HIP has been installed")
  - set(ENV{HIP_PATH} ${HIP_PATH})
  - else()
  - set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to which HIP has been installed")
  - endif()
  - endif()
  -
  - find_program(GINKGO_HIPCONFIG_PATH hipconfig HINTS "${HIP_PATH}/bin")
  if(GINKGO_HIPCONFIG_PATH)
  execute_process(COMMAND ${GINKGO_HIPCONFIG_PATH} --platform OUTPUT_VARIABLE GINKGO_HIP_PLATFORM)
  elseif(DEFINED ENV{HIP_PLATFORM})
  