Skip to content

Setting up a local project

Alena Lifar edited this page Jun 27, 2017 · 9 revisions

Each local project can be set up and run independently from the whole project. Each of these local projects represent one or more solutions for every task described in README.md.

Environment set up

  • C++11 standart
  • Python3 (>=3.4 v)
  • CMake (>2.6 v)
  • Env var "algorithms" for path to the whole project (used in local projects for linking)

Make targets

make run : this target will build and run executable file for each project written in c++. cd to a project folder (ex. trees/binary_heap ) and hit make run. The video below shows an example of how to do it:

asciicast

make test: this target runs tests on projects/scripts that are written in python. cd to a project folder and hit make test.

For those python projects that don't have make automation just execute *.py scripts by python3 {name_of_script}.py

Setting up a CMake Project

Basic knowledge of cmake concepts required.

For each folder there is a CMakeLists.txt file. To run each project follow these simple instructions:

  • Create a build/ folder inside the local project (near CMakeLists.txt).
  • Execute command: cmake ".."
  • Execute command: make
  • Previous step will create a binary file. Then just execute the binary file with ./name_of_file command
Clone this wiki locally