This is a repository that represents a basic, minimal, c++ project setup using cmake and conda. This currently includes:
- Creation of a
kernel
library. - Creation of an
api
library to expose thiskernel
library. - Creation of a python interface to enable access to the
api
from python.
Currently only building on windows using msbuild
has been tested.
Instructions to this regard are in the following section.
- Clone this repository
- Ensure
conda
(or preferablymamba
) is installed. - Ensure
msbuildtools
are available, and on the path.
-
From repository root, create conda environment:
conda env create -f environment.yml
. This will create a conda environment calledbasic-setup
-
Activate this conda environment:
conda activate basic-setup
. -
Run cmake:
cmake --preset windows-default
-
From the created
build
folder, runmsbuild
:msbuild basicSetup.sln
-
Add the directory of the created python interface to the python path:
set PYTHONPATH=%PYTHONPATH%;<repo root>\build\lib\Debug
- To test that the setup has been successfull, from the repository root run:
python -c "from basicSetupApi import helloWorld; helloWorld(<your name>)"