rocm-cmake
rocm-cmake copied to clipboard
Fix own cmake files - also create symlink from INCLUDE cmake
from 5.2.0, hip and rocm will also add cmake file into <ROCM>/<PACKAGE>/lib/cmake (not just <ROCM>/lib/cmake/<PACAKGE>)
hiprand and rocrand reports include could not find load file: ...
The workaround is link the missing file from <ROCM>/lib/cmake/<PACAKGE> to <ROCM>/<PACKAGE>/lib/cmake or use -D<pacakge_lower_case>_DIR=<ROCM>/<PACKAGE>/lib/cmake in CMake
Issue:
When cmake find the file inside <ROCM>/<PACKAGE>/lib/cmake, it will create issue about cmakefile non-found.
https://github.com/RadeonOpenCompute/rocm-cmake/blob/03ec8374afec9d96afb9cc817fb9258feb84ed32/share/rocm/cmake/ROCMInstallTargets.cmake#L289-L293
only adds the INCLUDE cmake into CONFIG_PACKAGE_INSTALL_DIR, which is lib/cmake/<PACKAGE>
and looks for the file from current cmake folder. ( <ROCM>/<PACKAGE>/lib/cmake)
Thus, it can not find the file because symlink is not created.
also create the symlink for INCLUDE cmakefile. another way is to change the path to look for the INCLUDE, but I think all cmake should be under the same folder from the rocm cmakefile structure
@lawruble13 Thanks for suggestion. Another way might glob all *.cmake from the source dir. I am sure whether it will lead the circular issue I posted before again. Also, sorry for no further reply in posted issue. I missed the notification