[CMake] Copying cmake generated files to another machine
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Dec 7 16:22:23 EST 2009
On Monday 07 December 2009, steve naroff wrote:
> Thanks for your comments Oscar.
>
> Our current thinking is to post process the cmake generated files and
> remove all the absolute paths (since the project files are simply
> text). Since cmake is a black box to me (and I am unfamiliar with it's
> generated 'code'), it's unclear if this a 'good' idea? Or will I bump
> into other gotcha's?
Possibly (at least you would if this was for KDE).
In KDEs build files cmake itself is also called from the makefiles, not only
for generating makefiles, but also e.g. to execute scripts, copy files,
create directories, and other things we are otherwise not portable between
different OSs.
With "cmake -E" you can do such things in a portable way, or you can run
simple scripts via "cmake -p", in both cases embedded as COMMAND in
add_custom_target() or add_custom_command().
Also, cmake itself is used for generating the C dependencies. I don't know
what happens if you don't have cmake around.
So, as the others say, consider cmake a part of the toolchain which must be
installed on the building host.
Alex
More information about the CMake
mailing list