cmake - 未知的 CMake 命令 "cotire"。

标签 cmake

这是我的 dockerfile:

from ubuntu:16.04
maintainer Nico Cesar <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="83edeae0ecc3edeae0ece0e6f0e2f1ade0ecee" rel="noreferrer noopener nofollow">[email protected]</a>>

# Set the env variable DEBIAN_FRONTEND to noninteractive
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update &&  apt-get install -y git cmake python-virtualenv python-pip

RUN git clone https://github.com/lyft/envoy.git
RUN cd envoy && make
RUN cd envoy && mkdir -p build && cd build && cmake ..

我收到此错误

CMake Error at source/common/CMakeLists.txt:141 (cotire):
   Unknown CMake command "cotire".

如何向 CMake 添加命令?这是取自 Envoy github 的。

他们声称 ubuntu14 可以工作,但是 g++ 太旧了,而且 ubuntu16 缺少我不熟悉的 cotire,知道如何添加它吗?

最佳答案

cotirecmake module on github它以跨平台的方式自动化为您的实现文件创建预编译头的过程。 github 项目有一堆无用的文件,但您真正需要的唯一文件位于 CMake/cotire.cmake。如果此文件存在于 CMake 的模块搜索路径中,则您的构建应该正常继续。

关于cmake - 未知的 CMake 命令 "cotire"。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43505145/

相关文章:

c++ - 对 `USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1_' 的 undefined reference

c++ - 将 CMake Ninja 构建输出设置为与 Unix Makefile 相同的格式

c++ - CLion 和 find_package : Generated CMake files are placed in some odd location 问题

CMake-配置 : Permission Denied

c++ - 使用 FetchContent_ 处理嵌套的 cmake 项目

makefile - 使用 CMake 包含外部 makefile

opencv - 使用cmake错误构建opencv

c - 如何使用 cmocka 库模拟无法修改的第三方库中的函数?

cmake - 在 CMake 中将文件添加到 source_group

c++ - CMake 中预期的构建失败测试