Updated Build (markdown)

Fangrui Song 2018-04-01 22:00:38 -07:00
parent 088499bb6f
commit eeca4952f3

@ -3,14 +3,14 @@ ccls has experimental support for the CMake build system.
To get started building ccls, first install the required dependencies:
* CMake 3.1 or higher
* C++ Compiler with C++14 support:
* Clang 3.4 or higher
* C++ Compiler with C++17 support:
* Clang 5 or higher
* GCC 5 or higher
* MSVC 2017 or higher (included with VS2017 Build Tools)
After installing the required dependencies, clone the repository along with its
git submodules using:
`git clone https://github.com/ccls-project/cquery.git --recursive`
`git clone https://github.com/MaskRay/ccls --recursive`
After cloning the repository, open a terminal and navigate to the ccls
directory. Then, create a build directory which will contain all files
@ -71,3 +71,20 @@ If the 'include' and 'lib' directories reside in two different parent
directories (possible when building LLVM from source) you will have to add both
these directories to CMAKE_PREFIX_PATH separated by a ';'
(`-DCMAKE\_PREFIX\_PATH="<include-parent-dir>;<lib-parent-dir>"`).
My personal config:
```zsh
CXX=clang++ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER=/usr/bin/ld.lld -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DSYSTEM_CLANG=On -DCMAKE_PREFIX_PATH="$HOME/Dev/llvm/static-release;$HOME/Dev/llvm/tools/clang" -Brelease -H.
```
```
% tree ~/Dev/llvm/static-release/lib/ -L 3
├── clang
│   └── 7.0.0
│   ├── include
│   └── lib
├── libclang.so -> libclang.so.7
├── libclang.so.7 -> libclang.so.7.0
└── libclang.so.7.0
```