Example of project structure for a C++ project with cmake
Switch branches/tags
Nothing to show
Clone or download

README.md

Build Status

CMake setup for a C++ project

This repository is a companion to our blogpost on Configuring CMake for success. It contains an example of our structure for a minimal program called palindrome which checks if a word is a palindrome, i.e. a word that reads the same backward as forward, see Wikipedia's article on Palindromes for some examples.

This repository contains subfolders with different versions of our project setup:

01-general-executable

This is the general setup for building a palindrome executable with some unittests.

02-general-lib

Setup for building libPalindrome as a public library to be used by others.

03-android-jni

Example setup for building an Android app for our C++ libPalindrome which we connect to via JNI (Java Native Interface). We keep the unittests from the general setup and hook them up so we can execute them outside the Android environment.