title: Compiling Caffe with Cmake and Ninja fails
body: <p>I tried compiling Caffe on windows with <code>CMAKE_BUILD_SHARED_LIBS</code> option on, but it failed and stated I need to use Ninja. When I set Ninja to 1 in the config file (<code>build_win.cmd</code>), and run the script, it complains and gives the following error message:</p>
  
  <pre><code> CMake Error: CMake was unable to find a build program corresponding to
   "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select
   a different build tool. CMake Error: CMAKE_C_COMPILER not set, after
   EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after
   EnableLanguage
   -- Configuring incomplete, errors occurred! ERROR: Configure failed
  </code></pre>
  
  <p>I don't know what other steps I need to take in order to have a successful compilation process. All I did was to download Ninja, extract it somewhere and add it to my environment variable.</p>
  
  <p>Do I need to install gcc as well?</p>
  
  <h2>Update</h2>
  
  <p>As suggested in the comments, I checked my path and noticed it was ill-configured. I fixed that now I get these errors, it seems it can't find the needed libraries:</p>
  
  <pre><code>-- The C compiler identification is GNU 6.3.0
  -- The CXX compiler identification is GNU 6.3.0
  -- Check for working C compiler: C:/Users/Master/gcc/bin/gcc.exe
  -- Check for working C compiler: C:/Users/Master/gcc/bin/gcc.exe -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: C:/Users/Master/gcc/bin/c++.exe
  -- Check for working CXX compiler: C:/Users/Master/gcc/bin/c++.exe -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    cmake/Dependencies.cmake:8 (find_package)
    CMakeLists.txt:79 (include)
  
  
  CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    cmake/Dependencies.cmake:8 (find_package)
    CMakeLists.txt:79 (include)
  
  
  CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
    Imported targets not available for Boost version
  Call Stack (most recent call first):
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
    cmake/Dependencies.cmake:8 (find_package)
    CMakeLists.txt:79 (include)
  
  
  -- Looking for pthread.h
  -- Looking for pthread.h - not found
  -- Found Threads: TRUE
  CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1793 (message):
    Unable to find the requested Boost libraries.
  
    Unable to find the Boost header files.  Please set BOOST_ROOT to the root
    directory containing Boost or BOOST_INCLUDEDIR to the directory containing
    Boost's headers.
  Call Stack (most recent call first):
    cmake/Dependencies.cmake:8 (find_package)
    CMakeLists.txt:79 (include)
  
  
  -- Could NOT find GFlags (missing:  GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)
  -- Could NOT find Glog (missing:  GLOG_INCLUDE_DIR GLOG_LIBRARY)
  CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
    Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
  Call Stack (most recent call first):
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
    C:/Program Files/CMake/share/cmake-3.7/Modules/FindProtobuf.cmake:393 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    cmake/ProtoBuf.cmake:9 (find_package)
    cmake/Dependencies.cmake:48 (include)
    CMakeLists.txt:79 (include)
  
  
  -- Configuring incomplete, errors occurred!
  See also "G:/caffe_latest2/build/CMakeFiles/CMakeOutput.log".
  See also "G:/caffe_latest2/build/CMakeFiles/CMakeError.log".
  ERROR: Configure failed
  </code></pre>