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
)