add_subdirectory error in CMake when installing Google Test

35 Views Asked by At

When I run the cmake .. command while installing Google Test, the following error occurs:

CMake Error at CMakeLists.txt:33 (add_subdirectory):  
 add_subdirectory given source "googlemock" which is not an existing   
 directory.

-- Configuring incomplete, errors occurred!

How do I solve this? These are the commands I was running beforehand:

  1. When I first used the cmake .. command, it failed with 'nmake' '-?' as the output
  2. Then I tried running cmake . -G "MinGW Makefiles", and received the add-subdirectory error above
  3. After that, when I tried the cmake .. command again, the same error occurs

Screenshots of the errors:

cmake ..

cmake . -G "MinGW Makefiles"

cmake ..

0

There are 0 best solutions below