Skip to content

chatopera/cpp-kick-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Layers Docker Version Docker Pulls Docker Stars Docker Commit

cpp-kick-starter

Are you ready to make magic with C++ in minutes?

Featured

  • gtest
  • glog
  • gflags
  • thrift
  • cross platform for docker funs

Prerequisites

You will need:

  • Docker
  • CMake 3.1+ installed (on a Mac, run brew install cmake)
  • If you prefer to code in a great IDE, I highly recommend VSCode. It is fully compatible with this project.

Bootstrap

Run a docker instance and just work, no efforts to install deps.

./admin/dev.sh

For the docker image used by this project, check out chatopera/cmake:3.14.3

Install Deps

If you still want to install the basic dependencies by your side, run below script.

./admin/install-3rd.sh # it is for Ubuntu only currently.

This script would execute every command in cmake/install in order.

Development

cd cpp-kick-starter
# build
mkdir -p build/debug
cd build/debug
cmake ../..
make
# run
src/divider/divider 1 5

# run tests
src/divider/divider_tests

# install
make install

Project Structure

There are three empty folders: lib, bin, and include. Those are populated by make install.

The rest should be obvious: src is the sources.

Now we can build this project, and below we show three separate ways to do so.

File Locations

  • src/* — C++ code that ultimately compiles into a library
  • src/*/*_test.cpp - C++ code to test each component.
  • bin/, lib, include are all empty directories, until the make install install the project artifacts there.

There are two components in src/ for demo purpose.

  • src/division - a library.
  • src/divider - an executable target which depends on division as a lib.

Help

Copyright

Copyright (2019) 北京华夏春松科技有限公司

Apache License Version 2.0

chatoper banner

About

Sophisticated C++ Project Skeleton

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •