[cmake-developers] RFC - new module for multilib configuration

Rolf Eike Beer eike at sf-mail.de
Wed Apr 23 04:45:17 EDT 2014


Am 23.04.2014 09:33, schrieb Faraz Shahbazker:
> Hi all,
> 
> I've been working on a generic cmake stub that allows libraries to be
> built with multiple configuration options a.k.a. multilib support in
> the style of GCC, on behalf of my employer. This feature allows a user
> to build multiple versions of the same library from the same source
> base but compiled with different options and ABIs. Automake provides a
> similar feature via macros in multilib.am.
> 
> May not seem very useful for desktops, but its pertinent for
> embedded/cross development. Typical ARM/MIPS toolchains supply a dozen
> multilib configurations, at least. I'd restrict the module to work
> with GNU CC, but it seems to play along just fine with LLVM Clang
> compiler, which has a gcc-compatible command-line.

I just did a quick look on the module because I do not have an urgent 
need for it, so this is just a little nitpick:

     string(REGEX REPLACE ";" "\\\\;" _C_MULTILIBS "${_C_MULTILIBS}")
     string(REGEX REPLACE "\n" ";" _C_MULTILIBS "${_C_MULTILIBS}")

Those can easily be written without REGEX, which will reduce the amount 
of backslashes.

Eike



More information about the cmake-developers mailing list