Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cmake Apache节俭编译C++;服务器_Cmake_Thrift - Fatal编程技术网

Cmake Apache节俭编译C++;服务器

Cmake Apache节俭编译C++;服务器,cmake,thrift,Cmake,Thrift,我不熟悉设置工具。对不起,问了个基本问题 我安装了Apache thrift,并成功地在Linux中运行了教程 我正在尝试创建并运行服务器。我正在使用CMAKE构建make文件。我刚刚从教程文件夹中复制了CMAKELIST.txt,并根据需要进行了更改 当我运行cmake时 cmakecmakelist.txt 我得到以下错误 CMake Error at CMakeLists.txt:20 (include_directories): include_directories given e

我不熟悉设置工具。对不起,问了个基本问题

我安装了Apache thrift,并成功地在Linux中运行了教程

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

当我运行cmake时

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

您能给我指一下正确的方向吗?

中定义了“链接到节俭库”的命令。如果要使用此命令,必须将
CMakeLists.txt
指向此宏文件。例如,如果将
ThriftMacros.cmake
文件存储在源目录的子文件夹
/cmake
中,则必须将以下行添加到
CMakeLists.txt

list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake" )
include(ThriftMacros)
然后,您可以将目标链接到:

LINK_AGAINST_THRIFT_LIBRARY(some_target thrift)