This is an example project that uses the cudawrappers library as a dependency by having it included as a git submodule.
To run the example, install the vector_add_example program from this repository:
git clone --recurse-submodules https://github.com/nlesc-recruit/usage-example-git-submodules
cd usage-example-git-submodules
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local -S . -B build
make -C build
make -C build installthe -DCMAKE_INSTALL_PREFIX=$HOME/.local tells the computer to install the
program in ~/.local. This is useful if you do not have root access
to the computer you are working on.
The example can be run with:
vector_add_exampleor, if ~/.local/bin is not in your $PATH,
~/.local/bin/vector_add_exampleThe expected behaviour is that
hurray! 2
is printed to the terminal.