[CMake] Copying cmake generated files to another machine

Óscar Fuentes ofv at wanadoo.es
Mon Dec 7 16:36:02 EST 2009


steve naroff <snaroff at apple.com> writes:

> 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?

I suggested that option to you on the past.

My guess is that the VS project files generated by CMake depends less on
absolute paths than the Makefiles generated for other build
systems. Building in-source maybe diminishes the amount of work too.

As LLVM/clang have no external dependencies, the problem is simpler. If
VS is installed on C: and the LLVM source and build directories are on
C: too, the problem is even simpler, because you can always replace an
absolute path with a relative one.

My advice is to start small: with a text editor, edit the top-level
project file, then edit the project file of lib/System, which does not
depend on any other file. Move the whole tree to somewhere else, open VS
and build just the System library. If it works, that's good. Proceed to
write a script for automating the absolute->relative path conversion.

> Any advice is appreciated...you have a lot more experience with this
> than I do!

Nor really. I investigated a bit when you asked but found essentially
what Eric and Brad explained on this thread. 

-- 
Óscar



More information about the CMake mailing list