Apache Thrift编译C ++服务器

问题描述 投票:1回答:1

我对设置工具不熟悉。抱歉,基本问题

我安装了Apache Thrift,并成功地在Linux中运行了这些教程。

我正在尝试创建和运行服务器。我正在使用CMAKE构建make文件。我只是从教程文件夹中复制了CMAKELIST.txt,并根据需要进行了更改。

当我执行cmake时,>

cmake CMakeList.txt

我收到以下错误

CMake Error at CMakeLists.txt:20 (include_directories):
  include_directories given empty-string as include directory.

CMake Error at CMakeLists.txt:27 (include):
  include could not find load file:

    ThriftMacros

CMake Error at CMakeLists.txt:38 (LINK_AGAINST_THRIFT_LIBRARY):
  Unknown CMake command "LINK_AGAINST_THRIFT_LIBRARY".

您能指出我正确的方向吗?>

我对设置工具不熟悉。对不起这个基本问题,我安装了Apache thrift,并成功在Linux中运行了这些教程。我正在尝试创建和运行服务器。我正在使用CMAKE构建...

cmake thrift
1个回答
0
投票

LINK_AGAINST_THRIFT_LIBRARY命令在ThriftMacros.cmake中定义。如果要使用此命令,则必须将ThriftMacros.cmake指向此宏文件。例如,如果将CMakeLists.txt文件存储在源目录的子文件夹ThriftMacros.cmake中,则必须在./cmake中添加以下行:

CMakeLists.txt
© www.soinside.com 2019 - 2024. All rights reserved.