CMake Warning at data-plane/suricata-3.0/nanomsg/CMakeLists.txt:242 (message): Could not find asciidoctor: skipping docs怎么修改掉这个报错
时间: 2024-02-01 13:02:10 浏览: 228
这个报错是因为在编译过程中缺少asciidoctor,可以通过以下几种方法解决:
1. 如果你不需要生成文档,可以忽略这个警告,不影响程序的编译和运行。
2. 如果需要生成文档,可以先安装asciidoctor,然后重新编译。在Ubuntu上,可以使用以下命令安装:
```
sudo apt-get install asciidoctor
```
在其他Linux发行版上,可以使用相应的包管理器安装asciidoctor。
3. 如果无法安装asciidoctor,可以在CMakeLists.txt中禁用文档生成,方法是将以下代码:
```
if (ASCIIDOC_FOUND)
add_custom_target(doc
${ASCIIDOC_EXECUTABLE} ${ASCIIDOC_FLAGS} -b html "${CMAKE_CURRENT_SOURCE_DIR}/doc/index.asciidoc"
COMMENT "Generating API documentation with Asciidoc" VERBATIM
)
add_custom_target(man
${ASCIIDOC_EXECUTABLE} ${ASCIIDOC_FLAGS} -b man "${CMAKE_CURRENT_SOURCE_DIR}/doc/index.asciidoc"
COMMENT "Generating API man pages with Asciidoc" VERBATIM
)
endif ()
```
修改为:
```
#if (ASCIIDOC_FOUND)
# add_custom_target(doc
# ${ASCIIDOC_EXECUTABLE} ${ASCIIDOC_FLAGS} -b html "${CMAKE_CURRENT_SOURCE_DIR}/doc/index.asciidoc"
# COMMENT "Generating API documentation with Asciidoc" VERBATIM
# )
# add_custom_target(man
# ${ASCIIDOC_EXECUTABLE} ${ASCIIDOC_FLAGS} -b man "${CMAKE_CURRENT_SOURCE_DIR}/doc/index.asciidoc"
# COMMENT "Generating API man pages with Asciidoc" VERBATIM
# )
#endif ()
```
阅读全文