[CMake] Using generator expressions with set_target_properties

Stephen Kelly steveire at gmail.com
Tue Jun 30 17:26:24 EDT 2015


Patrick Griffiths wrote:

> I'm trying to add the /PDBSTRIPPED option LINK_FLAGS_RELWITHDEBINFO config
> (Visual Studio generator, obviously):
> 
> set_target_properties(target PROPERTIES
>   LINK_FLAGS_RELWITHDEBINFO
> 
> "/PDBSTRIPPED:
$<TARGET_FILE_DIR:target>/stripped/$<TARGET_FILE_NAME:target>.pdb")
> 
> Unfortunately the generator expressions aren't being expanded.
> 
> Any suggestions on how I might accomplish this in a reasonable way?

Add the flag with target_link_libraries instead.

Thanks,

Steve.




More information about the CMake mailing list