On Thu, 21 Sep 2023 16:05:17 +0200
David Demelier <markand_AT_malikania.fr> wrote:
Dear David,
> It's near to impossible to convert a CMake project to make
> automatically, CMake is almost like a scripting language given the
> numerous of things you can do with it.
>
> Keep in mind that plain make (POSIX) is enough for really simple
> projects but can come limited when going portable. Although the use of
> pkg-config helps there are various places where you will need to pass
> additional compiler/linker flags. For those I like GNU make even
> though its syntax is somewhat strange at some points.
>
> Which projects are you referring to?
the "POSIX makefiles are not easily portable" aspect hasn't been true
for a long time. Check out the build system of my project libgrapheme.
It is 100% POSIX make and portable across all BSDs, macOS, Cygwin,
MinGW and of course Linux, including automatically naming and embedding
the semantic version as specified in the Makefile. This is done by
providing a very simple ./configure script that automatically modifies
config.mk and tells the user when they are working from a system that
hasn't been ported to yet.
libgrapheme has automatic unit tests and code generators written in
C99, so it's probably a very extreme example. You could easily adapt a
library project using the libgraphmee configure+config.mk+Makefile as a
basic template.
Feel free to contact me if you have any questions.
With best regards
Laslo
[0]:
https://git.suckless.org/libgrapheme/
Received on Fri Sep 22 2023 - 15:54:59 CEST