Beginner C library template with TDD.
libc template. docker build .
to generate an image to compile and run tests.
mkdir build
cd build
cmake ..
make
or:
docker run --rm -v ~/src/path:/src -w /src/build <included built image> cmake ..
docker run --rm -v ~/src/path:/src -w /src/build <included built image> make
After build:
ctest —output-on-failure . -V
or:
docker run --rm -v ${PWD}/src -w /src/build <included built image> ctest --output-on-failure=true . -V
We’ll attempt to use doxygen
to generate templates.
docker run --rm -w /src -v ~/Source/libc-template:/src nxpleuvenjenkins/doxygen doxygen doxyconf
.doxygen
config file, or use the included doxyconf
.doxygen
command on the config file.html
folder.or:
docker run --rm -v ~/Source/src/path:/src -w /src nxpleuvenjenkins/doxygen doxygen doxyconf
mkdir install
cd install
cmake ..
make
sudo make install
Only installs to:
/usr/local/*
so, may need to set and export LD_LIBRARY_PATH accordingly, or:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Alternatively, see exports.sh
, run with source
command for set-up.
Link with e.g.:
-l\
If using docker-toolbox
on Windows:
docker-machine env <your machine name here>
and follow the instructions.docker-toolbox
only allows you to map your users directory.docker build --rm .
docker run -it --rm -v ~/path/to/src:/src <image_id> /bin/bash
docker run --cap-add SYS_PTRACE -it -v ~/path/to/src:/src <image_id> /bin/bash
(optional for TSan).