Custom generator expressions

I was wondering whether there is any plan to introduce custom generator expressions. This would allow an inline equivalent to functions/macros. I don’t know if an equivalent of this feature already exists. I know that in Unix/GNU Make I used inline function calls a lot.

So something like the following (perhaps this syntax is not great, but I want to communicate the idea):

expression(MY_LIBRARY path)
set(RETURN "libraries/path")
return(RETURN)
endexpression()

add_library(Framework
    $<MY_LIBRARY:Framework,core/core.cpp # Full path becomes libraries/core/core.cpp
)

To my knowledge, there are no plans to offer custom generator expressions. I doubt that would be feasible, their implementation lives squarely in C++ land, and they are often on performance-sensitive code paths.

If you need to transform content in the project, that will have to be at configure time, not generation.