Add CMake support#34
Conversation
77f7706 to
63b9036
Compare
|
The tests fail due to not having char * strdup(const char *str) {
char * dup = malloc(sizeof(char) * (strlen(str) + 1));
if (!dup) return 0;
return strcpy(dup, str);
}I can go ahead and do this in this PR or in a separate one if you'd like. I believe the alternative is to detect Linux in the CMake configuration file and specify |
|
It looks like I'm sort of surprised strdup doesn't work in c99 mode anymore. |
|
Like I said, The solution here can take a few forms. :) |
|
I am not sure we want to maintain both automake and cmake. Should we instead switch to cmake and remove automake? If so, is there any particular reason why we should do that? Preferably with some more technical arguments than "it's more popular" :) As for the strdup issue, I think that's a valid problem but should be raised and fixed as a separate issue. |
|
CMake is more popular but that's not why I use it. Firstly, it supports Ninja (and a slew of other build systems). Ninja has cut down my build times immensely, and I take any chance I get to work with it. It also supports windows out of the box, including support for both MSVC as well as Cygwin or any other Unix-ey subsystem you want to run. This also means that if a downsteam project relies on there being automake and then a subsequent call to Though the number one reason why I use it is for its This lets me build my entire game engine, for example, with a single command and have the engine and all of its dependencies build using Ninja (takes ~30 seconds to build 6000 files). The only down side is its sometimes awkward syntax. However, in my personal opinion it's loads more readable and maintainable than Automake's cryptic macro system. Plus, by dropping a system that is used by many dependencies, all of which use Automake or Make alone, you don't have to write bootstrap scripts or hack in awkward pre-build steps to your build systems. |
|
Poul-Henning Kamp wrote a pretty amusing thrashing of autoconf and why we shouldn't use it anymore: https://queue.acm.org/detail.cfm?id=2349257 BTW, echo nest is all cmake, and a lot of spotify stuff is too from what I remember... |
|
@a1kon Thanks for the link, that article speaks to my soul. |
|
I am fine with changing to cmake if you also remove automake usage in the same PR |
|
👍 Will do, and will rebase on top of #35 as well. |
|
Rebased. New errors are due to non-standard GNU extensions (other byproducts of using Not sure how standard you want this to be, but if requiring a |
Because CMake is becoming increasingly popular.