0

I am trying to build the C++ library for Apache Thrift and I am getting a cmake error that I cannot quite decipher, this is the series of steps I followed to get the error

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

And the error I get is

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".

Has someone else encountered this error before as well?

Curious
  • 20,870
  • 8
  • 61
  • 146

1 Answers1

2

This isn't the way to build it. You need to build from the root directory as instructed otherwise, you will miss a whole slew of CMake definitions.

From the root repository directory:

mkdir cmake-build && cd cmake-build
cmake .. -DBUILD_CPP:BOOL=ON
Cinder Biscuits
  • 4,880
  • 31
  • 51