CMake build system

CMake build system for Caffe as suggest in #215 

Changes:
1. Tests are managed by CTest, but can be run as individual gtests or a batch gtest (test.test)
2. Building shared libs is controlled by BUILD_SHARED_LIBS flag set at configuration time (default is off)
3. Have yet to add Matlab wrapper
4. ~~Changed source tree in order to facilitate out-of-source build~~
5. Compiler must be specified before the first invokation of cmake (if default is other then gcc-4.6).
6. Test data location is dependent on the CMAKE_SOURCE_DIR variable; It is automatically set at make time.

Building tips:
- mkdir build
- cd build
- CC=gcc-4.6 cmake ../src
- make -j8
- ctest -v

Options are specified at cmake invokation with -D flag. Example: -DPYTHON=ON
- ~~PYTHON~~ BUILD_PYTHON [default OFF]
- ~~MATLAB~~ BUILD_MATLAB [default OFF]
- ~~EXAMPLES~~ BUILD_EXAMPLES [default ON]
- ~~TOOLS [ON]~~ Not anymore, tools are built by defualt
- BLAS [atlas, open, mkl; default atlas]
- BUILD_SHARED_LIBS [default OFF]
- CUDA_TEST_DEVICE [default 0]

Remarks:
- Tested only under Linux Mint 16
- ~~Have yet to figure out why tools require recompilation of Blob.cpp~~


It is a concern, but I believe replacing this script with BSD code is on
the PR authors' TODO list.

All licensing must be BSD-compatible for merge.


On Wed, Jun 25, 2014 at 6:07 AM, Rob Hess <notifications@github.com> wrote:

> In CMakeScripts/FindAtlas.cmake:
>
> > @@ -0,0 +1,79 @@
> > +# Copyright: (C) 2010 RobotCub Consortium
> > +# Authors: Arjan Gijsberts
> > +# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
>
> Is inclusion of an LGPL source file a concern here? I'd think this would
> not be compatible with the BSD license, but I'm not an expert in these
> things.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/BVLC/caffe/pull/442/files#r14158833>.
>