mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-28 10:31:56 +00:00
Update Build
parent
ad99236a5d
commit
2d57ccf79b
18
Build.md
18
Build.md
@ -17,7 +17,11 @@ directory. Then, create a build directory which will contain all files
|
|||||||
related to the build. Enter the build directory.
|
related to the build. Enter the build directory.
|
||||||
|
|
||||||
From inside the build directory, we can then configure the project with the
|
From inside the build directory, we can then configure the project with the
|
||||||
following command: `cmake ..`
|
following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cmake .. -DCMAKE_INSTALL_PREFIX=release -DCMAKE_EXPORT_COMPILE_COMMANDS=YES
|
||||||
|
```
|
||||||
|
|
||||||
[**Windows**] On Windows you have to explicitly tell CMake to target 64-bit
|
[**Windows**] On Windows you have to explicitly tell CMake to target 64-bit
|
||||||
architecture by adding the `-DCMAKE_GENERATOR_PLATFORM=x64` option to the
|
architecture by adding the `-DCMAKE_GENERATOR_PLATFORM=x64` option to the
|
||||||
@ -48,10 +52,12 @@ ccls. Debug is recommended when debugging cquery with a debugger. Since cquery
|
|||||||
defaults to a Release build it usually isn't necessary to define this option
|
defaults to a Release build it usually isn't necessary to define this option
|
||||||
unless you're debugging an issue in ccls with a debugger.
|
unless you're debugging an issue in ccls with a debugger.
|
||||||
|
|
||||||
* `-DSYSTEM_LIBCLANG=(ON|OFF)`
|
* `-DSYSTEM_CLANG=(ON|OFF)`
|
||||||
|
|
||||||
Enable `SYSTEM_LIBCLANG` if you want to link ccls against a system installation
|
Enable `SYSTEM_CLANG` if you want to link ccls against a system installation
|
||||||
of libclang instead of downloading libclang during the configure process.
|
of Clang instead of downloading Clang during the configure process.
|
||||||
|
|
||||||
|
Example: `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DSYSTEM_CLANG=On -Brelease -H. && cmake --build release`
|
||||||
|
|
||||||
* `-DCMAKE_PREFIX_PATH="custom_install_path"`
|
* `-DCMAKE_PREFIX_PATH="custom_install_path"`
|
||||||
|
|
||||||
@ -71,9 +77,9 @@ You may add directories for `include` and `lib` separated by a `;`, e.g. to use
|
|||||||
If using Windows the automatically downloaded LLVM binaries are 64-bit; you should build cquery in 64-bit as well. You can tell cmake to build 64-bit using `-DCMAKE_GENERATOR_PLATFORM=x64`
|
If using Windows the automatically downloaded LLVM binaries are 64-bit; you should build cquery in 64-bit as well. You can tell cmake to build 64-bit using `-DCMAKE_GENERATOR_PLATFORM=x64`
|
||||||
|
|
||||||
|
|
||||||
MaskRay's config:
|
MaskRay's config (building trunk LLVM at ~/Dev/llvm/static-release/ to get read/write/addr references and other features):
|
||||||
```zsh
|
```zsh
|
||||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_LINKER=ld.lld -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DSYSTEM_LIBCLANG=On -DCMAKE_PREFIX_PATH="$HOME/Dev/llvm/static-release;$HOME/Dev/llvm/tools/clang" -Brelease -H.
|
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_LINKER=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.
|
||||||
cmake --build release
|
cmake --build release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user