[CMake][Clang] Include llvm/Config/config.h under the clang source tree

Hi list

It turns out I can not include the llvm/Config/config.h under the clang source tree.
And, I accidentally did so, breaking some build according to Michał Górny in D78704.

How can we prevent this from happening in the future?
Shouldn’t be such //private// headers private to the CMake target in the first place?

In the mentioned patch I need a specific build configuration info for the test.
I’m checking if the LLVM_WITH_Z3 is defined or not - to detect the availability of Z3.
How should I query this instead?

I’m certainly not fluent in CMake so I would appreciate some help resolving this.

/CC Michał Górny

Thanks, Balazs.

If I'm not mistaken, llvm-config.h is the file for public definitions.
You'll probably have to add a #define for Z3 there.