- cmake as the build system with or without presets
- cross-platform portability on Linux, OS X and Windows
- multiple compilers: clang, g++ and MSVC
- modular structure with each module self-contained in a subdirectory within the project
- build helpers in common/cmake to facilitate declaration of library, exe, test modules, for the end-to-end lifecycle including doc generation, test, packaging etc...
- common facilities (common module) for platform specifics, assertions support, logging
- unit testing with Google Test
- code coverage with clang or g++
- zero-touch valgrind, clang-tidy, clang-format, google sanitizers, etc.
Development can be done locally or in a dev container with vscode.
git clone --recurse-submodules -j4 https://github.com/abdes/asap.git
NOTES:
- -j4 requests git to parallelize cloning of repos. Needs a relatively recent version of git. If that is not available, simply do not use this option.
Make sure you have a C++ compiler with C++-14 capabilities at least. Gnu, Clang and MSVC all can do that with a recent version.
Only one time after the project is cloned, do the following:
npx husky install
npm install -g @commitlint/cli @commitlint/config-conventional
npm install -g standard-version
mkdir _build && cd _build && cmake .. && cmake --build .
You can also use any of the cmake options, generators, etc...
By default the build will create shared libraries. If you want static libraries, pass -DBUILD_SHARED_LIBS=OFF to cmake during configuration:
cmake -DBUILD_SHARED_LIBS=OFF ..
You can also use any of the cmake options, generators, etc...
# Project options
option(BUILD_SHARED_LIBS "Build shared instead of static libraries." ON)
option(OPTION_SELF_CONTAINED "Create a self-contained install with all dependencies." OFF)
option(OPTION_BUILD_TESTS "Build tests." ON)
option(OPTION_BUILD_DOCS "Build documentation." OFF)
option(OPTION_BUILD_EXAMPLES "Build examples." OFF)
option(ASAP_WITH_GOOGLE_ASAN "Instrument code with address sanitizer" OFF)
option(ASAP_WITH_GOOGLE_UBSAN "Instrument code with undefined behavior sanitizer" OFF)
option(ASAP_WITH_GOOGLE_TSAN "Instrument code with thread sanitizer" OFF)
option(ASAP_WITH_VALGRIND "Builds targets with valgrind profilers added" OFF)