【发布时间】:2018-04-25 14:46:30
【问题描述】:
我尝试从 sources 构建 clang-tidy,但它抱怨未定义的 CMake 命令:
CMake Error at clang-apply-replacements/CMakeLists.txt:5 (add_clang_library):
Unknown CMake command "add_clang_library".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.9)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
如何构建 clang-tidy,或者如何在 macOS 上安装最新版本?
【问题讨论】:
-
另请参阅 GitHib 上的 Noloader | build-llvm。它是一个用于下载和构建 LLVM 和组件的 shell 脚本。在撰写本文时,它构建了最新版本的 tarball,即 7.0.0。至少它会正确执行下载并配置目录结构,这样您就不会在上面浪费时间。 (LLVM 项目应该提供这样的脚本供所有开发人员使用)。
标签: c++ clang llvm clang-tidy