This fixed build failures due to missing ompt headers.
Details
Diff Detail
Event Timeline
I'm not sure LIBOMP_OMPT_SUPPORT is guaranteed to be there yet when defined in runtime/. Maybe it would be better to move the option to the top-level openmp/CMakeList.txt and rename it to OPENMP_OMPT_SUPPORT (with compatibility support for LIBOMP_OMPT_SUPPORT)
If by 'guaranteed' you mean in the current code, then I've tested this patch with it being both true and false.
Maybe it would be better to move the option to the top-level openmp/CMakeList.txt and rename it to OPENMP_OMPT_SUPPORT (with compatibility support for LIBOMP_OMPT_SUPPORT)
I don't see a problem moving it. However, I'm not sure if rename is really desired. After all, AFAIU it's a characteristic of the library.
Ok, as long as it works for the release (that's probably the motivation?) I'm fine with this.
Maybe it would be better to move the option to the top-level openmp/CMakeList.txt and rename it to OPENMP_OMPT_SUPPORT (with compatibility support for LIBOMP_OMPT_SUPPORT)
I don't see a problem moving it. However, I'm not sure if rename is really desired. After all, AFAIU it's a characteristic of the library.
Currently yes, but OMPT callbacks might also be added to libomptarget. We'll need to move then at the latest, but I agree that it might be out-of-scope for this patch (I was just thinking for solutions if LIBOMP_OMPT_SUPPORT did not work here).
Yes, indeed the goal is to unbreak 10.x. I'd also agree to making bigger changes in 11.x separately.
From my understanding of cmake scoping, this variable is visible because it's a cached option?
Yes. It is also important that runtime directory is added before tools, so the default is set before it is checked.