Giter VIP home page Giter VIP logo

cppgoogletestdlproject's Introduction

CMake C++ Google Test Project template

GitHub last commit

GitHub release GitHub release date

C++17 Platforms macOS license

Sponsors Twitter @GeneDeLisaDev GitHub followers

What's this?

This is a CMake 3 configured C++ project.

There is one C++ class and it is shoved into a static library.

  • src contains the source for the library. Surprise!
  • include contains the headers.
  • test contains the Google test.
  • app contains a command line app that uses the library.

The executable and a test runner are built in build/bin.

Google Test/Mock are downloaded if an option is set.

Doxygen is run to generate documentation if an option is set. You need to download and install it first. I suggest you run the app to reconfigure doc/Doxyfile.in

There are Visual Studio Code tasks defined.

There is a script to generate an Xcode project.

Building

You run cmake from the build directory.

You might want to clean the build directory first.

rm -rf build/*

The normal build incantation is this:

cd build && cmake -D USE_UNIT_TESTING=ON -D GENERATE_DOC=ON .. && make all

Visual Studio Tasks defined

make all

Runs make all in the build directory

make doc

Runs make doc in the build directory

cd build && make doc

cmake

You probably want to run cmake once. Then when your code is updated, run make.

This task cleans the build directory, goes into it, runs cmake, then runs make all.

rm -rf build/* && cd build && cmake -D USE_UNIT_TESTING=ON -D GENERATE_DOC=ON .. && make all

clean build

Removes everything from the build directory.

rm -rf build/*

cmake just docs

Skips downloading Google Test and building the C++ code. Instead it does just the Doxygen guff.

rm -rf build/* && cd build && cmake -D USE_UNIT_TESTING=OFF -D GENERATE_DOC=ON .. && make doc

Blog post for this example

Blog post coming coon

Buy my kitty Giacomo some cat food

If you find this useful, my kitty likes snacks.

paypal

Giacomo Kitty

Licensing

MIT

Please read the LICENSE for details.

Credits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.