[LLVMdev] Is there room for another build system?

Óscar Fuentes
2008-07-31T13:53:30Z

Alain Frisch <alain.frisch at lexifi.com> writes:

[questions which are specific of CMake and not LLVM-related should be
directed to its mailing list. See www.cmake.org]

> Will the CMake-based approach support generating makefiles for MSVC
> builds?

Yes.

> generated makefiles will still use timestamps to trigger
> recompilations, instead of digests on the content

Makefiles uses timestamps, as this is the way makefiles work, other
build tools supported by CMake could use digests, I don't know.

> With CMake, are dependencies computed when makefiles are generated, or
> by makefiles themselves?  In both case, I guess the developer needs to
> perform some explicit action when dependencies changes, otherwise
> things might work well on his current tree but fail in a clean
> checkout.

AFAIK, when you modify an implicit dependency (i.e. add/remove an
#include to some .cpp file) or an explicit one (i.e. add/remove a source
file from a library or executable, change the list of libraries that an
executable uses, etc) CMake-generated makefiles do the right thing,
which may include re-generating the makefiles themselves. I don't know
about Visual Studio project files.

> Also, if Makefiles are to be generated for Windows, things like
> supporting pathnames properly and escaping is really tricky (or does
> CMake do a perfect job here?).

Quoting may be an issue. This all depends on what external tools you
need to invoke. For compilers and linkers, CMake does the right thing,
unless you use absolute Windows paths and then execute CMake on Unix,
etc.

> An approach like scons, [snip] but
> my company is happily using the OMake build system
[snip]

CMake and SCons are different beasts. SCons (and OMake?) are `make'
replacements, while CMake is a configuration/makefile generator.

Anyways, for the time being, I'm committed to CMake. I don't mind others
trying different tools and, if you come with a new LLVM build system
that supports VC++ 2003 and up, I'll happily throw away my work with
CMake.

--
Oscar