From baadaf7602af04ba37e86187f6b81c795fa788b0 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Fri, 6 Nov 2020 17:21:06 +0330 Subject: updated the readme accordingly with the new cmake build --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 2481f23..c46f10c 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ You can get cgrep from AUR. Thanks to [schra](https://github.com/schra). ### Cygwin You will need `libclang-devel, libllvm-devel, clang, libiconv-devel`. +### Good Ole' Makefiles +**NOTE:the monolithic libtooling library is not supported with the good ole makefiles. Look down below at Cmake for that.**
Assuming you have the llvm/clang libraries (the build file will read your llvm options using `llvm-config` so make sure it's in path), just run: ```bash @@ -75,6 +77,19 @@ make CXX=clang-9 LLVM_CONF=llvm-config-9 For windows builds, cygwin builds are supported. Get llvm and clang along with their sources and build like usual. If you run into problems while building on cygwin, you can take a look at the `appveyor.yml` file under the repository root. +### Cmake +To do an out-of-source build simply do:
+```bash +git clone https://github.com/bloodstalker/cgrep +cd cgrep +git submodule init +git submodule update +mkdir build +cmake ../ -DLLVM_CONF=llvm-config-10 -DCMAKE_CXX_COMPIELR=clang++-10 -DUSE_MONOLITH_LIBTOOLING=ON +make +``` +The 3 variables denote the llvm-config executable name, the clang++ name and finally, the last one tells cmake whether to build using the single c++ libtooling library or just use the old way with all the libtooling libraries.
+ ## Usage A simple usage example: -- cgit v1.2.3