xo-reflect: README: howto using xo-build
This commit is contained in:
parent
fb8f4fdec2
commit
6c856be0fc
2 changed files with 38 additions and 15 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
||||||
|
# emacs workspace config
|
||||||
|
.projectile
|
||||||
# clangd working space (see emacs+lsp)
|
# clangd working space (see emacs+lsp)
|
||||||
.cache
|
.cache
|
||||||
# typical cmake build directory (source-tree-nephew)
|
# typical cmake build directory (source-tree-nephew)
|
||||||
|
|
|
||||||
51
README.md
51
README.md
|
|
@ -2,28 +2,49 @@
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
### build + install dependencies
|
### build + install `xo-cmake` dependency
|
||||||
|
|
||||||
- [github/Rconybea/refcnt](https://github.com/Rconybea/refcnt)
|
- [github/Rconybea/xo-cmake](https://github.com/Rconybea/xo-cmake)
|
||||||
- [github/Rconybea/subsys](https://github.com/Rconybea/subsys)
|
|
||||||
|
|
||||||
### build + install
|
Installs a few cmake ingredients, along with a build assistant `xo-build` for XO projects such as this one.
|
||||||
|
|
||||||
|
### build + install other XO dependencies
|
||||||
```
|
```
|
||||||
$ cd reflect
|
$ xo-build --clone --configure --build --install xo-indentlog
|
||||||
$ mkdir build
|
$ xo-build --clone --configure --build --install xo-refnct
|
||||||
$ cd build
|
$ xo-build --clone --configure --build --install xo-subsys
|
||||||
$ INSTALL_PREFIX=/usr/local # or wherever you prefer
|
```
|
||||||
$ cmake -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} ..
|
|
||||||
$ make
|
Note: can use `-n` to dry-run here
|
||||||
$ make install
|
|
||||||
|
### copy `xo-reflect` repository locally
|
||||||
|
```
|
||||||
|
$ xo-build --clone xo-reflect
|
||||||
|
```
|
||||||
|
|
||||||
|
or equivalently
|
||||||
|
```
|
||||||
|
$ git clone git@github.com:Rconybea/xo-reflect.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### build + install xo-reflect
|
||||||
|
```
|
||||||
|
$ xo-build --configure --build --install xo-reflect
|
||||||
|
```
|
||||||
|
|
||||||
|
or equivalently:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ PREFIX=/usr/local # or wherever you prefer
|
||||||
|
$ cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} -S xo-reflect -B xo-reflect/.build
|
||||||
|
$ cmake --build xo-reflect/.build
|
||||||
|
$ cmake --install xo-reflect/.build
|
||||||
```
|
```
|
||||||
|
|
||||||
### build for unit test coverage
|
### build for unit test coverage
|
||||||
```
|
```
|
||||||
$ cd xo-reflect
|
$ cmake -DCMAKE_BUILD_TYPE=coverage -DCMAKE_INSTALL_PREFIX=$PREFIX xo-reflect/.build-ccov
|
||||||
$ mkdir build-ccov
|
$ cmake --build xo-reflect/.build-ccov
|
||||||
$ cd build-ccov
|
|
||||||
$ cmake -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug ..
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### LSP support
|
### LSP support
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue