【发布时间】:2017-06-11 04:55:33
【问题描述】:
我在为 llvm/clang 运行 cmake 时收到以下消息:
-- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS - Success
CMake Error at cmake/modules/AddLLVM.cmake:589 (if):
if given arguments:
"LTO" "IN_LIST" "LLVM_DISTRIBUTION_COMPONENTS" "OR" "NOT" "LLVM_DISTRIBUTION_COMPONENTS"
Unknown arguments specified
Call Stack (most recent call first):
tools/lto/CMakeLists.txt:19 (add_llvm_library)
-- Configuring incomplete, errors occurred!
这是我正在使用的命令:
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_LTO=开启 -Wno-dev ..
几个月前,我成功构建了llvm/clang 5.0。但是今天,我在各个目录和子目录上做了一个“git pull”来获取最新的变化。
另外,我将我的 cmake 更新到 3.8.2。但这没有帮助。
根据评论者的请求,这里是没有no-dev 选项的输出:
-- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS - Success
CMake Warning (dev) at cmake/modules/AddLLVM.cmake:589 (if):
Policy CMP0057 is not set: Support new IN_LIST if() operator. Run "cmake
--help-policy CMP0057" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
IN_LIST will be interpreted as an operator when the policy is set to NEW.
Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
tools/lto/CMakeLists.txt:19 (add_llvm_library)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at cmake/modules/AddLLVM.cmake:589 (if):
if given arguments:
"LTO" "IN_LIST" "LLVM_DISTRIBUTION_COMPONENTS" "OR" "NOT" "LLVM_DISTRIBUTION_COMPONENTS"
Unknown arguments specified
Call Stack (most recent call first):
tools/lto/CMakeLists.txt:19 (add_llvm_library)
【问题讨论】:
-
选项
Wno-dev禁用警告,这可能会显示错误。 (可能IN_LIST不支持cmake_minimum_required中指定的版本。)不带此选项运行cmake。 -
@Tsyvarev:我已经更新了我的问题,也列出了没有
no-dev选项的输出。
标签: c++ macos cmake clang llvm