News for hackers. Stuff that matters.
Re:What I Learned from porting my projects to FreeBSD by tom_ on Sunday October 28, 2018 @07:23PM (#18323846)
Spare your fingers ;) - you'll never convince anybody of the value of cmake by telling them about it. You just have to put them in a situation where they're looking after a program that has to build on multiple desktop platforms, and they'll figure it out eventually...

(The combination I've always had to deal with is Linux, OS X and Windows/VC++ - but any combination that includes both Windows/VC++ and a POSIX-type OS is probably enough to make it worthwhile. The POSIX/non-POSIX differences are rather annoying to deal with otherwise, and that quite apart from how most Windows programmers will quite reasonably want to use a Visual Studio project rather than a Makefile.)

506c

Re:What I Learned from porting my projects to FreeBSD by AHTERIX5000 on Monday October 29, 2018 @04:46AM (#18325900)
Yeah, CMake and autotools solve different problems than make. I'm definitely not a fan of either one but if I need to really distribute and compile something on more than one OS there isn't much of a choice.

The posted makefile example fails right away on multiple platforms since headers are often in somewhere else than in /usr/include directly, for example in Debian the right (atm) path would be /usr/include/libpng16 and Makefile does not handle that.

Re:What I Learned from porting my projects to FreeBSD by enriquto on Monday October 29, 2018 @05:25AM (#18326043)
> The posted makefile example fails right away on multiple platforms since headers are often in somewhere else

And that's the intended behavior. Finding system headers around your disk is not a problem that a build system must try to solve. This is the task of a distribution or a packaging system, which is a different problem as you say.

Re:What I Learned from porting my projects to FreeBSD by AHTERIX5000 on Monday October 29, 2018 @05:38AM (#18326107)
Yeah I agree, it's not the ideal situation but it is the real world. Simple makefiles do not work often and there are systems that can solve the problem. Not elegant, brilliantly designed tools but ones that work anyway.
Re:What I Learned from porting my projects to FreeBSD by enriquto on Monday October 29, 2018 @04:37AM (#18325867)
I hope this day never arrives for me... In any case, if I ever had to compile something for windows I would rather install cygwin and a posix toolchain than cmake and visual studio.