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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Keane, Erich via cfe-dev
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.

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

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

Keane, Erich via cfe-dev
On Wed, 2020-07-29 at 15:11 +0000, Balázs Benics wrote:

> 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 <https://reviews.llvm.org/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?
>
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.

--
Best regards,
Michał Górny


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

signature.asc (631 bytes) Download Attachment