message: Manually extract the HIP_VERSION.
  Since it does not work in the FindHIP.cmake file.
diff: @@ -67,6 +67,29 @@ if(NOT HIP_HIPCC_CMAKE_LINKER_HELPER)
  find_program(HIP_HIPCC_CMAKE_LINKER_HELPER hipcc_cmake_linker_helper)
  endif()
  +find_program(
  + HIP_HIPCONFIG_EXECUTABLE
  + NAMES hipconfig
  + PATHS
  + "${HIP_ROOT_DIR}"
  + ENV ROCM_PATH
  + ENV HIP_PATH
  + /opt/rocm
  + /opt/rocm/hip
  + PATH_SUFFIXES bin
  + NO_DEFAULT_PATH
  +)
  +if(NOT HIP_HIPCONFIG_EXECUTABLE)
  + # Now search in default paths
  + find_program(HIP_HIPCONFIG_EXECUTABLE hipconfig)
  +endif()
  +
  +execute_process(
  + COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --version
  + OUTPUT_VARIABLE GINKGO_HIP_VERSION
  + OUTPUT_STRIP_TRAILING_WHITESPACE
  + ERROR_STRIP_TRAILING_WHITESPACE
  + )
  if (GINKGO_HIP_PLATFORM MATCHES "nvcc") # ensure ENV{CUDA_PATH} is set by the user
  if (NOT DEFINED ENV{CUDA_PATH})
  @@ -185,18 +208,18 @@ set(GINKGO_HIP_HCC_OPTIONS ${GINKGO_HIP_HCC_COMPILER_FLAGS})
  set(GINKGO_HIP_CLANG_OPTIONS ${GINKGO_HIP_CLANG_COMPILER_FLAGS})
  set_source_files_properties(${GINKGO_HIP_SOURCES} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT TRUE)
  -if (HIP_VERSION GREATER_EQUAL "3.5")
  +if (GINKGO_HIP_VERSION GREATER_EQUAL "3.5")
  hip_add_library(ginkgo_hip $<TARGET_OBJECTS:ginkgo_hip_device> ${GINKGO_HIP_SOURCES}
  - HIPCC_OPTIONS "${GINKGO_HIPCC_OPTIONS} -std=c++11"
  - NVCC_OPTIONS "${GINKGO_HIP_NVCC_OPTIONS} ${GINKGO_HIP_CUDA_HOST_COMPILER}"
  + HIPCC_OPTIONS ${GINKGO_HIPCC_OPTIONS} "-std=c++11"
  HCC_OPTIONS ${GINKGO_HIP_HCC_OPTIONS}
  CLANG_OPTIONS ${GINKGO_HIP_CLANG_OPTIONS}
  + NVCC_OPTIONS ${GINKGO_HIP_NVCC_OPTIONS} ${GINKGO_HIP_CUDA_HOST_COMPILER}
  ${GINKGO_STATIC_OR_SHARED})
  else()
  hip_add_library(ginkgo_hip $<TARGET_OBJECTS:ginkgo_hip_device> ${GINKGO_HIP_SOURCES}
  - HIPCC_OPTIONS "${GINKGO_HIPCC_OPTIONS} -std=c++11"
  - NVCC_OPTIONS "${GINKGO_HIP_NVCC_OPTIONS} ${GINKGO_HIP_CUDA_HOST_COMPILER}"
  + HIPCC_OPTIONS ${GINKGO_HIPCC_OPTIONS} "-std=c++11"
  HCC_OPTIONS ${GINKGO_HIP_HCC_OPTIONS}
  + NVCC_OPTIONS ${GINKGO_HIP_NVCC_OPTIONS} ${GINKGO_HIP_CUDA_HOST_COMPILER}
  ${GINKGO_STATIC_OR_SHARED})
  endif()
  