/tog_sample

Theory of Games -- Sample Application

Primary LanguageC++MIT LicenseMIT

Theory of Games -- Sample Application

\cond MIT license \endcond

Requirements

To install this project, please ensure that you have installed the following (install guides are provided on the respective websites):

In addition, D2D depends on the following libraries:

These dependencies will be downloaded and configured automagically if not already present locally (requires an internet connection).


Run the following commands to download, build, and install this project.

git clone https://www.github.com/kartikkumar/tog_sample
cd tog_sample
git submodule init && git submodule update
mkdir build && cd build
cmake .. && cmake --build .

Note that dependencies are installed by fetching them online, in case they cannot be detected on your local system. If the build process fails, check the error log given. Typically, building fails due to timeout. Simply run the cmake --build . command once more.

Build options

You can pass the following, general command-line options when running CMake:

  • -DBUILD_MAIN[=ON (default)|OFF]: build the main-function
  • -DBUILD_SHARED_LIBS[=ON|OFF (default)]: build shared libraries instead of static
  • -DBUILD_DOXYGEN_DOCS[=ON|OFF (default)]: build the Doxygen documentation (LaTeX must be installed with amsmath package)
  • -DBUILD_TESTS[=ON|OFF (default)]: build tests (execute tests from build-directory using ctest -V)
  • -DBUILD_DEPENDENCIES[=ON|OFF (default)]: force local build of dependencies, instead of first searching system-wide using find_package()

The following command is conditional and can only be set if BUILD_TESTS = ON:

  • -DBUILD_COVERAGE_ANALYSIS[=ON|OFF (default)]: build code coverage using Gcov and LCOV (both must be installed; requires GCC compiler; execute coverage analysis from build-directory using make coverage)

Pass these options either directly to the cmake .. command, e.g., to build the tests:

cmake -DBUILD_TESTS=on ..

N.B.: Toggling options to build tests using ccmake does not work correctly, as the necessarily libraries are not download automagically!

Contributing

Once you've made your great commits:

  1. Fork TOG_Sample
  2. Create a topic branch - git checkout -b my_branch
  3. Push to your branch - git push origin my_branch
  4. Create a Pull Request from your branch
  5. That's it!

Disclaimer

The copyright holders are not liable for any damage(s) incurred due to improper use of this codebase.