BVLC/caffe — pull request #1167 by Yangqing (2014-09-26 22:11:08+00:00)
Title: [WIP] A working layer factory.

So I've been wanting to replace the old, sort-of-working layer factory function with a real registrar. This PR implements it, and hopefully makes writing new layers easier (instead of modifying an evergrowing if then statement, simply register a new layer).

A side effect is that, with registration in the code, we cannot use static library any more. For all binaries inside Caffe this is fine - I changed the behavior so that libcaffe.a is gone, and all binaries are linked directly with .o files. I am yet to test if .so works.

I am not an expert of CMake so I haven't changed the CMake file yet - you can see that when building with CMake, things fail because registration does not work with static libraries.

In terms of documentations, I have written a truly marvellous documentation of this, which this PR message is too short to contain. (Just kidding. I am in the process of finishing the documentation for it.)

Also, the PR may potentially break Windows builds. Just want to expose it first and see what you guys think about it.