Using cmake with nginx

Dmitry Petrov dmitry.petroff at gmail.com
Sun Dec 4 20:12:55 UTC 2022


>You may want to be more specific about issues you are talking
about.  In general, nginx build system requires little to no
effort from developers.

I'm speaking about manual vs automatic source-level dependency handling.
For example, CORE_DEPS is an easy but inaccurate cross-platform hack. The
same is true for ADDON_DEPS: if you add any header here, all addons will be
rebuilt on that header change.
That's not a big deal, because C compiles fast enough and ccache could be
used to mitigate "false positives" of hand-written deps. But there's room
for improvement for sure.
For example, I had build issues because of forgetting to include headers
into core/addon deps after splitting addon into a set of header/source
files.

>There are no plans to support CMake.
Targeting any modern C-oriented build system would add many benefits
including "standardized" routines for library detection, dependency
handling, etc.
Are there any plans on adding "per-addon header deps" so changes to a
single header don't result in all addons recompiling?


On Fri, Dec 2, 2022 at 7:07 PM Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Fri, Dec 02, 2022 at 02:07:43PM +0300, Dmitry Petrov wrote:
>
> > I'm sure many developers have faced issues with manual dependency
> handling
> > in the nginx build system. I've tried several workarounds which were
> > semi-acceptable for personal use, but definitely not something that you
> > would offer other people to use.
>
> You may want to be more specific about issues you are talking
> about.  In general, nginx build system requires little to no
> effort from developers.
>
> [...]
>
> > I'm attaching a small patch of that proof-of-concept attempt (based on v
> > 1.17.10). And I just want to ask if the community is interested in having
> > some kind of cmake support. The advantages for developers are:
>
> There are no plans to support CMake.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx-devel mailing list -- nginx-devel at nginx.org
> To unsubscribe send an email to nginx-devel-leave at nginx.org
>


-- 
Regards,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20221204/272b8840/attachment.htm>


More information about the nginx-devel mailing list