[CMake] Convert libtool convenience libraries to cmake

Yevgen Muntyan ymuntyan at gmail.com
Thu Apr 9 02:07:51 EDT 2009


Andreas Pakulat wrote:
> On 07.04.09 20:29:49, Yevgen Muntyan wrote:
>   
>> Hi,
>>
>> I want to convert an autotools project to cmake. But, I don't know how  
>> to solve the problem of the
>> convenience libraries. The issue is: the project builds a shared library  
>> of bunch of libtool convenience
>> libraries. Each convenience library uses different compilation flags  
>> (which is very important). So I can't
>> simply take all sources I got and stuff them into a shared library with  
>> add_library().
>>     
>
> Sure you can. You can set compile flags on a per source file basis with
> set_source_file_properties. If you have a bunch of files that get the same
> flags, put them into a variable, iterate over them and set the flags on
> each that way.
>   
Great, thanks. I thought the compilation flags were per-target, not 
per-file, as the faq entry seems to imply:
"Instead the source files may be listed in each target that needs them. 
They will be built for each target
separately using all the *preprocessor definitions and flags configured 
for that target.*"

Best regards,
Yevgen



More information about the CMake mailing list