mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
Updated Build (markdown)
parent
088499bb6f
commit
eeca4952f3
23
Build.md
23
Build.md
@ -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
|
||||
```
|
Loading…
Reference in New Issue
Block a user