[CMake] Tag Variable <OBJECTS>

Matthias Goesswein tisi at sbox.tugraz.at
Thu Apr 22 01:52:42 EDT 2010


Am 21.04.2010 18:56, schrieb Alexander Neundorf:
> On Wednesday 21 April 2010, Matthias Goesswein wrote:
>> Hello!
>>
>> My libarian-tool needs a flag before each object file:
>>
>> e.g.
>>
>> libarian -a file1.o -a file2.o -a file3.o library.a
>>
>> CMake provides the<OBJECTS>  tag variable for use within the rule
>> variable of the libarian, but i didn't fond a way to insert the "-a"
>> flags before each object file.
>>
>> Is there any way for doing that?
>
> AFAIK no.
> Please put it as feature request in the bug tracker.
> What kind of toolchain are you using ?
>
> Alex

I'd like to use the Softune toolchain (for Fujitsu Microcontrollers), 
and the librarian can only add object files to an library with the "-a" 
command line option. All object files must have that flag. It could be 
done with wrapper shell scripts, but shells are platform specific and so 
it's for me a no go. It's no problem if you use only one build 
plattform, but if not so, you would have to write several shell scripts, 
or add the shell executable for each build plattform.

I've already put it in as a feature request yesterday 
(http://public.kitware.com/Bug/view.php?id=10588)

I also want to use Keil Compiler with CMake, but i would also need 
wrapper scripts for the compiler, librarian and linker, because of the 
non standard way of command line options. (It uses brackets, something 
like: cc -o{obj1.o,obj2.o,...})

It would be nice to have the latter approach of my feature request (with 
regular expressions), because it would be highly customizable. Someone 
could even change slashes to backslashes, which could be handy if a 
windows tool is used within cygwin or msys, which requires backslashes 
(slashes are standard on cygwin or msys).

Matthias.


More information about the CMake mailing list