cmakelists.txt的apache节俭错误

Apache Thrift errors with CMakeLists.txt

本文关键字:错误 apache txt cmakelists      更新时间:2023-10-16

我正在尝试构建Apache节省的C 库,并且我遇到的CMAKE错误我无法完全解密,这是我遵循的一系列步骤以获取错误

git clone https://git-wip-us.apache.org/repos/asf/thrift.git
cd thrift/lib/cpp
mkdir cmake-build
cmake ..

我遇到的错误是

CMake Error at CMakeLists.txt:162 (include):
  include could not find load file:
    ThriftMacros
CMake Error at CMakeLists.txt:164 (ADD_LIBRARY_THRIFT):
  Unknown CMake command "ADD_LIBRARY_THRIFT".

其他人之前是否遇到过此错误?

这不是构建它的方法。您需要按照否则指示的根目录构建,您会错过一大批CMake定义。

来自根存储库目录:

mkdir cmake-build && cd cmake-build
cmake .. -DBUILD_CPP:BOOL=ON