Changed linking order: -pthread -> back.
Otherwise error:
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[pycaffe] expose Net::CopyTrainedLayersFrom as Net.copy_from

This allows finetuning from Python, for example.
[pycaffe] expose Net::SharedTrainedLayersWith as Net.share_with
Missing param.pad condition for CUDNN pooling
Merge pull request #1221 from sguada/fix_cuddn_pooling

Missing param.pad condition for CUDNN pooling
change -lpthread to -pthread in linking

Compilation flags is already there
change linking order such that pthread comes in the back

This resolves an error with the static gflags library which would
other wise not link properly with an undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
error under Ubuntu 14.04.
Merge pull request #1179 from ducha-aiki/fix_pthread_link

[fix] put pthread last in order for gflags
Merge pull request #1223 from baeuml/fix_pthread_link_cmake

[fix] set pthread last in linking order for gflags for CMake
use glog to provide a backtrace on crash
SliceLayer: fix whitespace
correct naming in comment and message about average_loss
[cmake] move dependency finding to root CMakeLists.txt

In this way, custom include directories for the dependencies are
also available for tools/ and the bindings.  This is necessary for
example when someone is using custom built dependencies which are
not installed in the system's default directories (e.g. OpenCV includes
are required in tools/ through io.hpp)
Merge pull request #1232 from baeuml/cmake-move-dependency-discovery

[cmake] move dependency discovery to root CMakeLists.txt
Merge pull request #1227 from longjon/crash-backtrace

Use glog to provide a backtrace on crash
Fix CMake build of pycaffe
- generate right shared library name
- fix CMake linking with the new layer factory
- find numpy

Fix finding protobuf.
Merge pull request #1206 from BlGene/dev

Fix python plugin to work with new layer factory in CMake build
Merge pull request #1195 from longjon/python-copy-from

Expose Net.copy_from and Net.share_with in pycaffe
Merge remote-tracking branch 'upstream/dev' into dev
fix instantiation