Installs a few cmake ingredients, along with a build assistant xo-build
for XO projects such as this one.
$ xo-build --clone --configure --build --install xo-indentlog
$ xo-build --clone --configure --build --install xo-refnct
$ xo-build --clone --configure --build --install xo-subsys
$ xo-build --clone --configure --build --install xo-reflect
$ xo-build --clone --configure --build --install xo-expression
$ xo-build --clone --configure --build --install xo-jit
$ xo-build --clone --configure --build --install xo-pyutil
$ xo-build --clone xo-pyexpression`
or equivalently
$ git clone git@github.com:Rconybea/xo-pyexpression.git
$ xo-build --configure --build --install xo-pyexpression
or equivalently:
$ PREFIX=/usr/local # or preferred install location
$ cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -S xo-pyexpression -B xo-pyyexpression/.build
$ cmake --build xo-pyexpression/.build -j
$ cmake --install xo-pyexpression/.build
(also see .github/workflows/main.yml)
Assumes xo-pyexpression
installed to ~/local2/lib
,
i.e. built with PREFIX=~/local2
.
PYTHONPATH=~/locasl2/lib:$PYTHONPATH python
>>> import xo_pyexpression
>>> dir(xo_pyexpression)
['Expression', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'exprtype']
Requires that supporting libraries (e.g. xo_pyreflect
) appear in PYTHONPATH
$ cd xo-pyexpression/.build/src/pyexpression
$ python
>>> import xo_pyexpression
$ cd xo-pyexpression
$ cmake -DCMAKE_BUILD_TYPE=coverage -DENABLE_TESTING=on -S . -B .build-ccov
$ cmake --build .build-ccov -j
LSP looks for compile commands in the root of the source tree; while Cmake creates them in the root of its build directory.
$ cd xo-pyexpression
$ ln -s .build/compile_commands.json # supply compile commands to LSP
-L
list variables-A
include 'advanced' variables-H
include help text
$ cd xo-pyexpression/.build
$ cmake -LAH