Skip to content

Programming: Principles and Practice Using C++ - Exercises... and so much more :-)

Notifications You must be signed in to change notification settings

NadzwyczajnaGrupaRobocza/papuc_exercises

Repository files navigation

Build status Build Status

papuc_exercises

Programming: Principles and Practice Using C++ - Exercises... and more.

Update your fork with changes from the common repository

In the root directory of the project:

  1. add common repository as a git remote:

    git remote add upstream https://github.com/NadzwyczajnaGrupaRobocza/papuc_exercises.git
  2. pull common repository changes to local cache

    git fetch upstream
  3. make sure you're at your main brach

    git checkout master
  4. merge upstream changes to your checkout

    git pull --rebase upstream master

Only step 4 is needed to later repeat the procedure

Initialize gtest submodule

In the root directory of the project:

  1. Make git aware of the fact we have submodule

    git submodule init
  2. Actually pull the submodules

    git submodule update

You're now ready to compile stuff.

Build instructions

In the root directory of the project do the following:

  1. create build directory and enter it

    mkdir build; cd build
  2. run cmake and point it ot the root dir

    cmake ..
  3. run make (point it to the desired target binary) e.g.

    make <target-name>

Note that target name is the same as first argument given to cmake add_executable function.

Adding own code to the build system:

  1. Move your files to your user directory (<project-root>/<user-prefix>/...)

  2. Edit the CMakeLists.txt file in your user directory.

    • In "add_executable" command, replace empty.cpp with the name of your source file.
    • You can add more source files to the add_executable command - it takes in a space separated list of files of any length.
  3. Follow the build instructions to let the cmake magic happen.

About

Programming: Principles and Practice Using C++ - Exercises... and so much more :-)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •