我正在尝试构建 google-cloud-cpp,但出现错误(见下文)。我曾尝试使用 VC++ 和 g++
构建它,但在使用这两种方法时我都遇到了同样的错误。我使用 cmake-gui。
构建环境:Visual Studios 2017
操作系统:Windows 10 专业版 64 位构建环境:Mingw-w64 8.1.0
操作系统:Windows 10 专业版 64 位
目标:64 位
错误:
CMake Error at cmake/IncludeGMock.cmake:38 (add_library):
Cannot find source file:
D:/google-cloud-cpp/third_party/googletest/googletest/src/gtest-all.cc
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
cmake/GoogleCloudCppCommon.cmake:48 (include)
google/cloud/CMakeLists.txt:42 (include)
CMake Error at cmake/IncludeGMock.cmake:38 (add_library):
No SOURCES given to target: gmock
Call Stack (most recent call first):
cmake/GoogleCloudCppCommon.cmake:48 (include)
google/cloud/CMakeLists.txt:42 (include)
最佳答案
在 git 克隆之后 https://github.com/GoogleCloudPlatform/google-cloud-cpp.git
进入目录
运行 git submodule update --init
关于c++ - google-cloud-cpp CMake 生成失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52220754/