THPP是Facebook发布的一个张量C++库。安装MultiPathNet时需要,如果没有安装则会报错。
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
THPP_INCLUDE_DIR
used as include directory in directory /tmp/luarocks_fbpython-0.1-2-4373/fblualib/fblualib/python
THPP_LIBRARY
linked by target "lua_module" in directory /tmp/luarocks_fbpython-0.1-2-4373/fblualib/fblualib/python
其实THPP安装比较简单,因为可以选择不依赖 folly和 fbthrift,因此只编译自己就可以了。
安装方法:
git clone https://github.com/facebook/thpp.git
cd thpp/thpp
vi CMakeLists.txt
将其中的
OPTION(NO_THRIFT "enabling this will exclude all code that depends on Thrift from the build" OFF)
OPTION(NO_FOLLY "enabling this will exclude all code that depends on Folly from the build" OFF)
OPTION(NO_TESTS "enabling this will disable building tests" OFF)
更改为:
OPTION(NO_THRIFT "enabling this will exclude all code that depends on Thrift from the build" ON)
OPTION(NO_FOLLY "enabling this will exclude all code that depends on Folly from the build" ON)
OPTION(NO_TESTS "enabling this will disable building tests" ON)
就是去掉所有依赖。
然后:
make
make install
结束。