HIP: NVIDIA platform requires hip-lang-config.cmake
!8817 (merged) added NVIDIA support for the HIP language which is awesome, thank you @brad.king!
I'm experimenting with how this might look like when used for https://github.com/amd/rocm-examples.
Configuring a HIP project with the NVIDIA platform still requires hip-lang-config.cmake
to be present in /opt/rocm/lib/cmake/hip-lang
otherwise cmake prints this error:
-- The HIP compiler identification is NVIDIA 11.6.124
CMake Error at /opt/cmake-dev/share/cmake-3.27/Modules/CMakeDetermineHIPCompiler.cmake:204 (message):
The ROCm root directory:
/opt/rocm
does not contain the HIP runtime CMake package, expected at one of:
/opt/rocm/lib/cmake/hip-lang/hip-lang-config.cmake
/opt/rocm/lib64/cmake/hip-lang/hip-lang-config.cmake
Call Stack (most recent call first):
CMakeLists.txt:5 (project)
-- Configuring incomplete, errors occurred!
ROCm does not install this file on nvidia platforms.
This file isn't ever read by cmake, so an easy workaround is to just create and empty file in that location.
Edited by Mészáros Gergely