如何在Waf中检查指定的头文件?

时间:2021-03-27 21:22:02

I'm using waf to build a C program. I'd like to check for the existence of a particular header file during the configuration phase. Is there a way to do that?

我正在使用waf构建一个C程序。我想在配置阶段检查是否存在特定的头文件。有没有办法做到这一点?

1 个解决方案

#1


6  

Ah, a bit of googling found the answer to my question: You can use the check method on Configuration objects, like so:

啊,有点谷歌搜索找到了我的问题的答案:您可以在配置对象上使用check方法,如下所示:

def configure(conf):
    conf.check(header_name="stdbool.h")

#1


6  

Ah, a bit of googling found the answer to my question: You can use the check method on Configuration objects, like so:

啊,有点谷歌搜索找到了我的问题的答案:您可以在配置对象上使用check方法,如下所示:

def configure(conf):
    conf.check(header_name="stdbool.h")