[CMake] Copying cmake generated files to another machine
steve naroff
snaroff at apple.com
Sun Dec 6 13:40:50 EST 2009
Thanks for the quick response...comments below:
On Dec 6, 2009, at 12:20 PM, Eric Noulard wrote:
> 2009/12/6 steve naroff <snaroff at apple.com>:
>> Hi, I work on llvm/clang (a client of cmake).
>> For development, cmake is wonderful (no big issues).
>> For deployment, cmake's inability to copy it's generated project
>> files to
>> another machine is causing us some grief. The scenario is quite
>> simple: I
>> want to copy the llvm/clang source tree over another machine
>> (running the
>> same OS/tools) and build it *without* having to rerun cmake and
>> generate
>> *new* project files. Without this ability, it requires the target
>> machine
>> have cmake installed (which isn't convenient for some clients that
>> want to
>> build/use/master the result of the llvm/clang build). What was a 1
>> step
>> process (open the project file) now becomes a 3 step process
>> (install cmake,
>> run it to generate the project file, open the project file).
>> Last time I checked (about a year ago) the usage model I've
>> outlined wasn't
>> supported. Is this still the case? Is there any workaround?
>> Thanks for any help with this,
>
> I think that the topic has been discussed several times and each time
> (I remember)
> the answer was, this not possible (in general) to make cmake produce
> a build
> tree (i.e. project file) which may copied and re-used without CMake.
>
> There is the CMAKE_SUPPRESS_REGENERATION which may be used
> to suppress the "build tree / project file" regeneration (which
> implies CMake usage)
> but I think this does not work if your build tree is not exactly the
> same on
> the target machine (i.e. full absolute path to file is the same).
> There is the CMAKE_USE_RELATIVE_PATHS option but Bill said recently
> that it should be deprecated:
> http://www.cmake.org/pipermail/cmake/2009-November/033456.html
>
I've tried using this in the past (without much success).
> However being able to somehow "prepare" a build tree and give it to a
> customer/user
> seems to be important for several people.
> May be we can achieve this **without** requiring the fact that CMake
> should not be run.
>
> 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).
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).
snaroff
> My idea is YOU WON'T HAVE TO **INSTALL** CMake but when you
> unzip your build tree you'll get:
> - the source tree
> - the pre-configured build tree
> - the cmake binary folder.
>
> Could be something like:
> MyProject----------Sources
> |_____Build
> |_____CMake
>
>
> Would the idea fits the need?
> Potential user may step in and tell us what they think?
> Would it be doable?
> I think it could be done with some "special" CPack generator
> but may be CMake developer can tell us what they think of this
> [may be wrong] idea?
>
> With this feature you'll get a "portable" project which contains the
> source tree,
> a preconfigured build tree + some cmake binaries corresponding to the
> build tree.
>
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
More information about the CMake
mailing list