Is there a way to force variable expansion on a string that contains a variable reference?
In my case I have a variable SOME_VAR that is set by the user on the command line and contains a reference to a variable that is defined in the CMake script – something like this:
cmake ... -DSOME_VAR="${SOME_OTHER_VAR}_bar"
And my script defines SOME_OTHER_VAR to be “foo”. But if I then print out SOME_VAR, I still see “${SOME_OTHER_VAR}_bar”, rather than “foo_bar”.
Is there something I can do to trigger variable expansion in SOME_VAR?