I'm pretty sure you just ran into the "Link-time Code Generation" feature of VS2012. As the name suggests, code generation is done during linking the whole program, not while compiling each source file.
This is done to be able to optimize across object file boundaries, which MS calls "Whole Program Optimization". Unfortunately, this considerably slows down builds.
Since it is an optimization technique, it should be turned off for debug builds. So to verify that this is in fact the problem, check if the debug build has the same problem. If not, it is probably the Link-time Code Generation.
To turn it off, right-click your project in Solution Explorer, and select "Properties". Then, go to "Configuration Properties", "Linker", "Optimization". Change the "Link Time Code Generation" property to "Default". Make sure that you do this for all the libraries in your solution!
That should speed up your build again, hopefully...