Skip to content

Minimalist c++ project template with automated testing built in.

Notifications You must be signed in to change notification settings

dadair-ca/minimal-cpp-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This is a minimal project template that should build and run out of the box, that includes automated testing using Google Test. For any small project, all you need to do is change src/main.cpp, and add any new files (.cc and .h) in src/. To test these new files/functions, change the test_SRCS list in test/CMakeLists.txt (line 14) and add a new file in tests/. See test/sanity_check.cc for an example of writing a test.

To build your project, do the following:

./configure
make -j12
./bin/projectname

please note that the build will fail if the tests fail

To change the name of the executable from projectname, change the PROJECT(..) (line 7) target in CMakeLists.txt.

  1. Prerequisites
  2. Building
  3. Installing
  4. Contributing

PREREQUISITES

This project requires:

  • Cross-platform Make (CMake) v2.6.2+
  • GNU Make or equivalent.
  • GCC or an alternative, reasonably conformant C++ compiler.

BUILDING

This project uses the Cross-platform Make (CMake) build system. However, we have conveniently provided a wrapper configure script and Makefile so that the typical build invocation of "./configure" followed by "make" will work. For a list of all possible build targets, use the command "make help".

NOTE: Users of CMake may believe that the top-level Makefile has been generated by CMake; it hasn't, so please do not delete that file.

INSTALLING

Once the project has been built (see "BUILDING"), execute "sudo make install".

CONTRIBUTING

This project has been created with strict following of the Google C++ Style Guide, available at: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml. Please follow the coding style. In some cases (commonly when subclassing external files) the files may follow a different coding style as defined by the project. In such cases, follow the style of the file to maintain consistency.

About

Minimalist c++ project template with automated testing built in.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published