[CMake] Building for 2 platforms with 4 compilers
Michael Wild
themiwi at gmail.com
Fri Apr 30 05:35:46 EDT 2010
On 30. Apr, 2010, at 11:16 , Kārlis Repsons wrote:
> Good day in here,
> I was trying to figure out how should CMake be used to automate building, which
> can happen on two or more platforms with some 4 compilers to be used in total,
> and should store the results in file tree like $platform/$compiler or
> $platform/$compilerEnvironment. Could you please suggest me how should it be
> done? Some example?
>
> (the idea is to store various builds with all of their intermediate files in
> parallel both to test code against wider set of compilers and platforms, some
> of which will be built with cross compiling environments)
Write a script that creates for each of the combinations a separate build tree and then invokes CMake as appropriate. If you want to, you can also use cache-initializer scripts (see the CMake documentation) to set common options in the cache. Since you are building on multiple platforms (presumably not cross-compiling), you'll want to write the script as a CMake script (or Ruby, Python, Lua, whichever suits you best).
I hope this helps, otherwise we'll probably need a bit more information...
Michael
More information about the CMake
mailing list