build2 / build2

build2 build system
MIT License
591 stars 15 forks source link

Feature tests like CMake's check_include_file #404

Closed SirNate0 closed 1 month ago

SirNate0 commented 3 months ago

Does build2 have any comparable feature's to CMake's check_include_file and related tests? E.g. those used by SDL all over this file? If not, how would one implement something similar (e.g. how would one build SDL with build2)?

karen-arutyunov commented 3 months ago

The recommended way to deal with this is by adding the corresponding check to the libbuild2-autoconf module using the same approach as in the already existing checks. But there is a way to check for system headers in build2 by using $\.find_system_header() function, where the <module> can be either c or cxx (with potentially different results).

You can find more details in the following thread in the #build2 channel on Slack: https://cpplang.slack.com/archives/CDJ0Z991S/p1712758112177769

boris-kolpackov commented 1 month ago

Also see https://github.com/build2/libbuild2-autoconf/issues/67

I am going to close this issue since it's more of a question (which, BTW, are better to ask in other places: https://build2.org/community.xhtml#help).