[CMake] Copying cmake generated files to another machine

Eric Noulard eric.noulard at gmail.com
Sun Dec 6 14:06:28 EST 2009


2009/12/6 steve naroff <snaroff at apple.com>:
>>
>> May be we can think of "packaging" CMake itself along with the build tree?
>
> Packaging the binaries isn't considered acceptable (we need a "pure" source
> distribution with no binary files).

Sorry for being picky but you don't "require a pure source".

You want to have the file used by your target
build system (Makefile or any other "project file") to be shipped with
your source tree.
Considering that such file may not be "portable at all"
(visual studio project files, nmake vs unix makefiles etc...)
you may consider them as binary file.

Some unix people (like me) do tend to consider autotools to be better tools
in this area because you don't NEED autotools in order to build an
autotoolized project,
because the generated "configure" scripts only requires a shell.
Now once you target "Windows" systems you discover that requiring a
shell may be too much :-)

I did switch my build system from autotools to cmake as soon as I target
a "portable" build on Windows.

> A spin on your idea is to package the CMake source itself (and build it from
> scratch, prior to building llvm/clang). Unfortunately, this approach is
> quite "heavy" (but may be the cleanest given the constraints).

I see. Personnally I have another point of view regarding this.
Once I decided to go for a CMake build system for my project,
I consider CMake to be part of the compiler suite.

If I require a compiler to be installed for compiling the source of my project
I do require CMake to be installed too.

Now I think I clearly understand (and respect) your point and I know
people who are sticking
to hand-crafted makefiles for their project because they do not want
to "require cmake for building".
I respect that, however in most of the case [I know] they require GNU Make :-)
[not even talking about recursive makefile headache for doing generative
 stuff during the build]

That said embbeding CMake source and bootstrapping it before your project
should be doable, you are right. Again I'm not sure that would be
"more portable" than downloading a prebuilt cmake archive (zip, tgz, etc...)
from CMake site and/or directly giving your user the archive.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list