title: Why do I get a CMake Error in gmock's CMakeLists.txt when compiling gtest dependency?
body: <p>I'm using GCC 4.8.4, GNU Make 3.81, and CMake 2.8.12.2 on my Ubuntu 14.04 machine trying to compile a small project that depends on gtest and gmock. You can view the full source of this project along with my CMake files <a href="https://github.com/natemurthy/misc/tree/master/cpp-stuff/containers" rel="nofollow noreferrer">here</a>. I perform the usual steps of doing <code>mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make</code> but hit this error after downloading, extracting, and configuring the gmock 1.7.0 dependency:</p>
  
  <pre><code>CMake Error at CMakeLists.txt:51 (add_subdirectory):
    add_subdirectory given source "../gtest" which is not an existing
    directory.
  
  CMake Error at CMakeLists.txt:56 (config_compiler_and_linker):
    Unknown CMake command "config_compiler_and_linker".
  </code></pre>
  
  <p>To be clear, these are errors found when running the <code>add_subdirectory</code> and <code>config_compiler_and_linker</code> commands in gmock's <a href="https://github.com/google/googlemock/blob/master/googlemock/CMakeLists.txt" rel="nofollow noreferrer">CMakeLists.txt</a> file when attempting to reference the gtest dependency. I've raised this issue on <a href="https://github.com/google/googlemock/issues/203" rel="nofollow noreferrer" title="Google&#39;s github account">Google's github account</a> already to see if any contributors could help me out.</p>
  
  <p>Here's another example of the same build failure, not sure how the owners of this project resolved their issue: <a href="https://travis-ci.org/open-eid/esteid-pkcs11/builds/39580725" rel="nofollow noreferrer">https://travis-ci.org/open-eid/esteid-pkcs11/builds/39580725</a></p>