tartan 1.2.2.1
Chess API
|
Project have to be configured with cmake
utillity. Install it on you'r system.
To build and run the demo of chess game (without documentation), you can:
To get the repo from github, you can execute the
To get ready for configuring step, execute next:
Configuring has a bit of flexibility. You can use next cmake defines during configuration:
Option | Type | Fallback variabble | Meaning |
---|---|---|---|
TARTAN_TARTAN | bool | YES | Provide build and install rules for library |
TARTAN_DOCS | bool | PROJECT_IS_TOP_LEVEL | Find doxygen and tools for docs generation |
TARTAN_TESTING | bool | PROJECT_IS_TOP_LEVEL | Enable testing and build test executables |
Fallback varriable value is used when the corresponding Option is not defined.
To configure a project, do the:
from the tartan/build
directory. To configure project to not build tests and documentation:
To produce executables, you have to execute:
That command will build all targets (that have not been disabled by Build system configuration options)
Avaliable targets:
Target name | Explanation |
---|---|
tt_board | Board class and it's perefirals. (tartan/board/ ) |
tt_chess | Chessboard class and it's perefirals (tartan/chess/ ) |
doc | Documentation |
iplay | Interactive textual chess game implementation |
For example, to build iplay
target, you can
in the tartan/build
directory.
To test the produced executables, run the ctest
tool in the build
directory.
Note that no test will be avaliable when the TARTAN_TESTING
is set to false.
The tartan/build/
directory will contain next folders (if You have not disabled some components with options at Build system configuration):
doc
Documentation of library. You can open html documentation by opening tartan/build/doc/html/index.html
in your browser.board
Base board and piece API classes library (tt::Board, tt::Piece)chess
Chess game implemented (tt::chess)tests
Test executables. The tests/interactivePlay
is a example chess implementationpackaging/out
Path where cpack
will wirte it's generated packages