How to transform a list of relative paths into absolute paths using generator expressions?

Is perhaps today already available some either hacky or recommended way to transform a list of paths to their absolute paths using generator expressions?

Because this would be needed in add_custom_command and similar cases when dealing with target sources. There were some feature requests opened a very long time ago but I’m not sure if there was some different solution added in the meantime: https://gitlab.kitware.com/cmake/cmake/-/issues/19598

Did you try $<PATH:ABSOLUTE_PATH[,NORMALIZE],path...,base_directory> ?

2 Likes

Wow! This now works also with a list of paths! Yes, this is it. Thank you so much. You saved the day. Then I think the above feature request could be closed.

Thank you too!
It is the first time I resolve an issue on this board. :slight_smile:

2 Likes