All Projects → LearningByExample → Moderncppci

LearningByExample / Moderncppci

Licence: mit
This is an example of doing a Modern C++ project with CI

Programming Languages

cpp
1120 projects
cpp17
186 projects
cpp14
131 projects

Projects that are alternatives of or similar to Moderncppci

Boomerang
Boomerang Decompiler - Fighting the code-rot :)
Stars: ✭ 265 (+143.12%)
Mutual labels:  cmake, clang, gcc, visual-studio
Ci helloworld
A simple example of how to setup a complete CI environment for C and C++
Stars: ✭ 357 (+227.52%)
Mutual labels:  clang, gcc, xcode, visual-studio
ci playground
Playground for Cloud CI development for C++
Stars: ✭ 23 (-78.9%)
Mutual labels:  visual-studio, ci, gcc, clang
Format.cmake
💅 Stylize your code! Automatic clang-format and cmake-format targets for CMake.
Stars: ✭ 94 (-13.76%)
Mutual labels:  continuous-integration, ci, clang
FrameOfReference
C++ library to pack and unpack vectors of integers having a small range of values using a technique called Frame of Reference
Stars: ✭ 36 (-66.97%)
Mutual labels:  visual-studio, gcc, clang
developer-ci-benefits
Talk docs—includes CI (Continuous Integration) benefits, description, and setup tips 💡💪
Stars: ✭ 29 (-73.39%)
Mutual labels:  unit-testing, continuous-integration, ci
Arm Cmake Toolchains
CMake toolchain configurations for ARM
Stars: ✭ 148 (+35.78%)
Mutual labels:  cmake, clang, gcc
Xcov
Nice code coverage reporting without hassle
Stars: ✭ 467 (+328.44%)
Mutual labels:  xcode, ci, continuous-integration
Cmake Examples
Useful CMake Examples
Stars: ✭ 7,220 (+6523.85%)
Mutual labels:  cmake, clang, unit-testing
Genie
GENie - Project generator tool
Stars: ✭ 693 (+535.78%)
Mutual labels:  cmake, xcode, visual-studio
Modern Cpp Template
A template for modern C++ projects using CMake, Clang-Format, CI, unit testing and more, with support for downstream inclusion.
Stars: ✭ 690 (+533.03%)
Mutual labels:  cmake, ci, continuous-integration
Openrct2
An open source re-implementation of RollerCoaster Tycoon 2 🎢
Stars: ✭ 10,115 (+9179.82%)
Mutual labels:  cmake, xcode, visual-studio
Cmake Scripts
A selection of useful scripts for use in CMake projects, include code coverage, sanitizers, and dependency graph generation.
Stars: ✭ 202 (+85.32%)
Mutual labels:  cmake, clang, gcc
Fixed point
C++ Binary Fixed-Point Arithmetic
Stars: ✭ 199 (+82.57%)
Mutual labels:  cmake, clang, gcc
Polymcu
An open framework for micro-controller software
Stars: ✭ 173 (+58.72%)
Mutual labels:  cmake, clang, gcc
Cmakepchcompiler
CMake precompiled header support via custom PCH compiler extension
Stars: ✭ 105 (-3.67%)
Mutual labels:  cmake, clang, gcc
Sol2
Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
Stars: ✭ 2,791 (+2460.55%)
Mutual labels:  clang, gcc, visual-studio
Moderncppstarter
🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.
Stars: ✭ 2,381 (+2084.4%)
Mutual labels:  cmake, ci, continuous-integration
Php Censor
PHP Censor is an open source self-hosted continuous integration server for PHP projects.
Stars: ✭ 619 (+467.89%)
Mutual labels:  ci, continuous-integration, unit-testing
Croaring
Roaring bitmaps in C (and C++)
Stars: ✭ 735 (+574.31%)
Mutual labels:  clang, gcc, visual-studio

Modern C++ Continuous Integration

This project is illustrating this blog post.

License: MIT

Build status Systems / Compilers
CLang  / GCC / XCode Builds Linux (clang38 / gcc6) OSX (XCode 8.3 clang)
Visual Studio Builds Windows (Visual Studio 2017 / 2015)

info

This is an example of doing a Modern C++ project with CI.

It use basic C++14 syntax, but nothing really complicated.

This project try to follow C++ Core Guidelines whenever its possible.

CMake is the chosen build system using ctest.

libraries used

  • spdlog for a moderm log system. (as submodule)
  • catch as the test framework. (as submodule)

project structure

folder Content
/lib library
/lib/src library sources
/lib/include library includes
/lib/test library test
/app application
/app/src application sources
/app/test application test
/third_party third party software

Generate project

  cmake -H. -BBuild

Auto detect everything.

If you like to set a implicit compiler set the variable CXX=${COMPILER}, for example COMPILER could be gcc, clang and so on.

Auto detect in Windows usually generate a Visual Studio project since msbuild require it, but in OSX does not generate and XCode project, since is not required for compiling using XCode clang.

Specify build type debug/release

  # generate a debug project
  cmake -H. -BBuild -DCMAKE_BUILD_TYPE=Debug
  # generate a release project
  cmake -H. -BBuild -DCMAKE_BUILD_TYPE=Release

Specify architecture

  # 64 bits architecture
  cmake -H. -BBuild -Ax64
  # ARM architecture
  cmake -H. -BBuild -AARM
  # Windows 32 bits architecture
  cmake -H. -BBuild -AxWin32

Generate different project types

  # MinGW makefiles
  cmake -H. -BBuild -G "MinGW Makefiles"
  # XCode project
  cmake -H. -BBuild -G "XCode"
  # Visual Studio 15 2017 solution
  cmake -H. -BBuild -G "Visual Studio 15 2017"

Build

From the Build folder

  # build the default build type (in multi build types usually debug)
  cmake --build .
  # build a specific build type
  cmake --build . --config Release

Run tests

From the Build folder

  # run all test using the default build type
  ctest -V
  # run all test in Release build type
  ctest -V -C Release

references

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].