message: Also fix the CMAKE_CUDA_HOST_COMPILER setup.
diff: @@ -70,6 +70,8 @@ set(GINKGO_HIP_HCC_COMPILER_FLAGS @GINKGO_HIP_HCC_COMPILER_FLAGS@)
  set(GINKGO_HIP_NVCC_COMPILER_FLAGS @GINKGO_HIP_NVCC_COMPILER_FLAGS@)
  set(GINKGO_HIP_CLANG_COMPILER_FLAGS @GINKGO_HIP_CLANG_COMPILER_FLAGS@)
  set(GINKGO_HIP_PLATFORM @GINKGO_HIP_PLATFORM@)
  +set(GINKGO_HIP_PLATFORM_AMD_REGEX @HIP_PLATFORM_AMD_REGEX@)
  +set(GINKGO_HIP_PLATFORM_NVIDIA_REGEX @HIP_PLATFORM_NVIDIA_REGEX@)
  set(GINKGO_HIP_AMDGPU @GINKGO_HIP_AMDGPU@)
  set(GINKGO_HIP_VERSION @GINKGO_HIP_VERSION@)
  set(GINKGO_AMD_ARCH_FLAGS @GINKGO_AMD_ARCH_FLAGS@)
  @@ -150,10 +152,14 @@ endif()
  # NOTE: we do not export benchmarks, examples, tests or devel tools
  # so `third_party` libraries are currently unneeded.
  -# propagate CUDA_HOST_COMPILER if Ginkgo was built with CUDA
  -if (GINKGO_BUILD_CUDA AND GINKGO_CUDA_HOST_COMPILER AND NOT CMAKE_CUDA_HOST_COMPILER)
  - message(STATUS "Ginkgo: Setting CUDA host compiler to ${GINKGO_CXX_COMPILER}")
  - set(CMAKE_CUDA_HOST_COMPILER "${GINKGO_CXX_COMPILER}" CACHE STRING "" FORCE)
  +# propagate CUDA_HOST_COMPILER if Ginkgo needed
  +if (GINKGO_BUILD_CUDA OR (GINKGO_BUILD_HIP
  + AND GINKGO_HIP_PLATFORM MATCHES "${GINKGO_HIP_PLATFORM_NVIDIA_REGEX}"))
  + if (GINKGO_CUDA_HOST_COMPILER AND NOT CMAKE_CUDA_HOST_COMPILER
  + AND EXISTS "${GINKGO_CUDA_HOST_COMPILER}")
  + message(STATUS "Ginkgo: Setting CUDA host compiler to ${GINKGO_CUDA_HOST_COMPILER}")
  + set(CMAKE_CUDA_HOST_COMPILER "${GINKGO_CUDA_HOST_COMPILER}" CACHE STRING "" FORCE)
  + endif()
  endif()
  if(GINKGO_HAVE_PAPI_SDE)
  