cxxclean / cxx-clean-include

65 stars 22 forks source link

怎么编译这个项目? #1

Open xuzhen1994 opened 8 years ago

xuzhen1994 commented 8 years ago

我在QT Creator中用cmake编译时出现如下错误:

CMake Error at CMakeLists.txt:3 (add_clang_executable):
  Unknown CMake command "add_clang_executable".

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.6)

  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!
See also "E:/Users/XXXX/Desktop/cxx-clean-include-master/src-build/CMakeFiles/CMakeOutput.log".

我是新手,对clang,llvm不很了解。编译时需要加什么参数吗?

YunrayZhang commented 8 years ago

I suppose you are missing something about LLVM so that nobody can compile an cxx_clean.exe at all.

cxxclean commented 8 years ago

不好意思,之前不知道有这个功能所以没看到,关于clang的编译过程我整理了一部分放在源码文件夹里了,由于这是clang的一个插件,所以需要根据官方的教程检出llvm和clang的源码才能进行编译,同时需要cmake 3.6版本以上

zengqu commented 6 years ago

额,下载了源码对应的llvm版本:289317,clang版本:289309 的这两个版本,也是编译不过。

环境: CMAKE 3.10.3 版本 IDE VS2015 llvm版本:289317 clang版本:289309

不覆盖源代码目录下面的LLVM和clang可以编译过 覆盖了源代码目录下面的的LLVM和clang文件之后,VS2015编译不过。