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.
- Try this container
docker run --rm -w /src -v ~/Source/libc-template:/src nxpleuvenjenkins/doxygen doxygen doxyconf. - Create
doxygenconfig file, or use the includeddoxyconf. - Run the
doxygencommand on the config file. - Serve the pages in the
htmlfolder. - Or set up on GitHub Pages.
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<libname>
- libcheck for unit testing
- pkg-config
- cmake
- Docker
If using docker-toolbox on Windows:
- Setup a hyperv driver docker-machine and external network switch.
- Run
docker-machine env <your machine name here>and follow the instructions. - Stuck here since
docker-toolboxonly allows you to map your users directory.
docker build --rm .docker run -it --rm -v ~/path/to/src:/src <image_id> /bin/bashdocker run --cap-add SYS_PTRACE -it -v ~/path/to/src:/src <image_id> /bin/bash(optional for TSan).