[CMake] good way to append link flags?

Clinton Stimpson clinton at elemtech.com
Wed Apr 23 12:30:40 EDT 2014


On Wednesday, April 23, 2014 06:25:24 PM Nils Gladitz wrote:
> On 23.04.2014 18:16, Clinton Stimpson wrote:
> > I am using
> > set_property(TARGET mytarget APPEND PROPERTY LINK_FLAGS "...")
> > multiple times to add various link flags.
> > 
> > But when I inspect the actual link command, I see all my flags separated
> > by
> > semi-colons and no spaces between them, which is not what I want.
> > 
> > Is this correct behavior for cmake?
> > 
> > Clint
> 
> Try APPEND_STRING (with explicit space) instead of APPEND.
> Some flag variables/properties are interpreted as strings rather than lists.
> 
> Nils

Oh!  Thanks, it works.

Clint


More information about the CMake mailing list