[CMake] How to surround an imported lib with extra flags onlink?
Martin Apel
martin.apel at simpack.de
Tue Mar 31 08:07:43 EDT 2009
Hi Alexandre,
I don't think that CMake is able to handle this. I searched for a
solution to a similar problem involving the use of the --start-group and
--end-group option for ld on Linux. You might be able to define custom
rules for this, but then you are definitely on platform-dependent
ground. Probably this would be something for a feature request.
If you find a solution to this, please let me know.
Best Regards
Martin
Alexandre Feblot wrote:
>
> Hi again,
>
> Would anybody have a solution for this?
>
> Thanks
>
> Alexandre
>
> ------------------------------------------------------------------------
>
> *Sent:* Monday, 30 March 2009 17:31
>
> Hi,
>
>
>
> I import some libs like this:
>
>
>
> add_library(${name} ${type} IMPORTED)
>
> set_target_properties(${name} PROPERTIES
>
> IMPORTED_LINK_INTERFACE_LIBRARIES "${other_imported_libs}"
>
> IMPORTED_LOCATION "${file}"
>
> )
>
>
>
> At the end, I link an executable which gets all required libs thanks
> to the imported interface property.
>
>
>
> Now, I need one of these imported libs to be surrouned like this: -z
> allextract ${the_lib} -z defaultextract
>
>
>
> I find no working way to add these flags in the
> IMPORTED_LINK_INTERFACE_LIBRARIES properties to get them properly at
> link time. What solution do I have?
>
>
>
>
>
> Thanks
>
>
> This email was sent to you by Thomson Reuters, the global news and
> information company.
> Any views expressed in this message are those of the individual
> sender, except where the sender specifically states them to be the
> views of Thomson Reuters.
____________
Virus checked by G DATA AntiVirus
Version: AVF 19.323 from 30.03.2009
More information about the CMake
mailing list