The folder expansion in install scripts created by CMake for "Visual Studio" generator, which uses multi config builds (MSBuild), requires using "expression generator", in order to correctly expand the target paths.
This is a mirror of the bug (https://bugs.llvm.org/show_bug.cgi?id=41030), which comes also with a lengthy description and some reasoning for the change.
The short version is:
The current scripts (throughout the LLVM project) use extensively CMake variable ${Configuration} to identify the current build type (e.g. Debug, Release, etc.), and expect that this variable gets expanded correctly when the runtime script is generated. This approach (in general) does not work for multi-config generators (e.g. MSBuild), which need all the possible build type script created in advance.
Some CMake scripts are working around this by using "specialized" (by build type) target properties (e.g. ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>) and basically do the expansion manually, some do not do that and those fail. This patch provides a fix for install path generations and also shows, how this topic should be handled in LLVM in the broader scope.
I think this will break Xcode