cmake version 3.5.1
ubuntu 16.04LTS
我想在ubuntu上编译llvm,请关注 git wiki:
$ git clone -b llvm-4.0 https://github.com/obfuscator-llvm/obfuscator.git
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE = Release ../ obfuscator /
执行cmake -DCMAKE_BUILD_TYPE=Release ../obfuscator/
时,报告ab错误:
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
CMake Error at cmake/modules/AddLLVM.cmake:1163 (add_custom_target):
add_custom_target cannot create target "check-llvm-bindings-ocaml"
because another target with the same name already exists.The
existing target is a custom target created in source directory
"/home/ryu/Ollvm/obfuscator/test". See documentation for policy
CMP0002 for more details.
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:1226 (add_lit_target)
test/CMakeLists.txt:150 (add_lit_testsuites)
我不知道check-llvm-bindings-ocaml是什么,以及我如何解决这个问题?你能帮助我吗?谢谢,谢谢,谢谢!!!
答案 0 :(得分:3)
我有同样的问题,波纹管命令可以解决它:
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release DLLVM_INCLUDE_TESTS=OFF
供参考: https://github.com/obfuscator-llvm/obfuscator/issues/71