Build with multiple versions of Visual Studio (2010, 2012, ...) in the same invocation of Gradle

In an earlier post it was mentioned that it is possible to build with different Visual Studio versions in one run.
I have tried to introduce different VisualCpp toolchains to achieve this without any success.
Can anybody tell me or give me an example how this works?