Are you ready to make magic with C++ in minutes?
- gtest
- glog
- gflags
- thrift
- cross platform for docker funs
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.
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
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.
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
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.
src/*— C++ code that ultimately compiles into a librarysrc/*/*_test.cpp- C++ code to test each component.bin/,lib,includeare all empty directories, until themake installinstall the project artifacts there.
src/division- a library.src/divider- an executable target which depends ondivisionas a lib.
Copyright (2019) 北京华夏春松科技有限公司