Using cmake with nginx

Alejandro Colomar alx.manpages at gmail.com
Sun Dec 4 21:10:41 UTC 2022


Hi Dmitry,

On 12/4/22 21:12, Dmitry Petrov wrote:
>  >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?
> 

There's no need for "modern" build systems.  GNU Make has been capable of doing 
that for decades.  See the Linux man-pages Makefile as an example.  And you 
don't need need to learn complex (I'd call CMake unnecessarily complex, rather 
than modern) stuff.  And of course, shell scripts generating Makefiles can also 
do that (and even more portably than GNU Make).

Autotools and CMake are both super-complex systems that IMO just make the build 
system more complex to understand, compared to sh(1)+make(1) or GNU Make.

Cheers,

Alex

-- 
<http://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20221204/660ac16e/attachment.bin>


More information about the nginx-devel mailing list