JonChesterfield added a comment. In D99949#2710273 <https://reviews.llvm.org/D99949#2710273>, @davezarzycki wrote:
> I removed all HSA/ROCM via the package manager and everything is fine now. > Have you considered using __has_include() instead of CMake? It seems to be > supported by all contemporary compilers, even MSVC. To confirm, you can build the pre-revert version of this patch after that adjustment? If so I'll give this another try. I have indeed considered something along the lines of #if __has_include #if __has_include("hsa.h") #include "hsa.h" #elif __has_include("hsa/hsa.h") #include "hsa/hsa.h" #endif #else #include "hsa.h" #endif It's tempting to forward declare the few pieces used instead. Hopefully the cmake find_package stuff will be robust enough to avoid such things. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99949/new/ https://reviews.llvm.org/D99949 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits