Skip to content

Example of project structure for a C++ project with cmake

License

Notifications You must be signed in to change notification settings

edumentab/cpp-project-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.