Ich versuche, zusammen mit moderne C++ - Programmierung mit Test-Driven Development zu folgen und das Buch Leser dazu zu veranlassen, zu installieren Google Mock 1.6. Versuchend lud ich die Quelle von here herunter. Dann nach dem Buch, das ich tun: mkdir build cd build cmake .. make
Einrichten von Google Mock 1.6
myComputer:build me$ cmake ..
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- The C compiler identification is AppleClang 8.0.0.8000042
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:56 (add_subdirectory):
add_subdirectory given source "../gtest" which is not an existing
directory.
CMake Error at CMakeLists.txt:61 (config_compiler_and_linker):
Unknown CMake command "config_compiler_and_linker".
-- Configuring incomplete, errors occurred!
See also "/Users/me/Downloads/googlemock-release-1.6.0 3/build/CMakeFiles/CMakeOutput.log".
Das ../gtest Verzeichnis in der Tat fehlt. Da diese die Verzeichnisse sind:
CHANGES COPYING build include scripts
CMakeLists.txt Makefile.am build-aux make src
CONTRIBUTORS README configure.ac msvc test
zur Verwirrung Hinzufügen sind diese Anweisungen:
You will also need to build Google Test, which is nested within Google Mock.
cd $GMOCK_HOME/gtest
mkdir mybuild
cd mybuild
cmake ..
make
ich in der Readme sah und ich nichts scheint, dass dieses Problem hilft zu lösen. Jede Hilfe/Anleitung wäre super!