Code Monkey home page Code Monkey logo

asap-projects / asap-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abdes/asap

1.0 0.0 0.0 2.99 MB

A cmake starter project for c++ with basic infrastructure including logging, assertions, platform specifics, and a complete build lifecycle. Portable across Linux, OS X and Windows.

License: BSD 3-Clause "New" or "Revised" License

CMake 28.12% Makefile 0.92% JavaScript 1.16% HTML 1.92% Shell 30.04% Dockerfile 1.34% C 8.03% C++ 28.47%

asap-app's Introduction

Starter project for C++ with cmake

Start Now!!

Linux Build (Ubuntu latest) Windows Build (latest)

Overview

  • 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.

Getting the code

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.

Requirements

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.

Enabling husky/commitlint/standard-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

Building

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)

asap-app's People

Contributors

abdes avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.