The project is configured to run on both Windows and Linux OS. We assume that you use Windows. Necessary software:
- CLion (your company should provide you with a license key)
- MinGW (g++, cmake, make)
- Please refer to this video instruction on YouTube
- Download and install CLion for Windows
- Download MinGW and follow this installation tutorial
For Linux please install:
- CLion
- g++
- valgrind
- cmake
- make
If you can build NumberGenerators
target, but you cannot build NumberGenerators-ut
target it probably means that MinGW does not properly support exceptions on your machine. Please reinstall MinGW and select another type of exception implementation in Exception
field.
If MinGW is problematic on your machine, feel free to use MSVC compiler. In fact, compiler type does not really matter. Just make sure it supports C++14.
Also if CLion is problematic, you can use Visual Studio 2015 Express.
You need to be able to compile both NumberGenerators
and NumberGenerators-ut
targets. We will be using similar build configurations in our training.
- Optional: Fork this repository to your own GitHub account (if you have one).
- Compile binary and unit tests in CLion. Select proper target, Ctrl+F9 compiles, Shift+F10 runs a chosen target. Steps for manual compilation in console with CMake:
> mkdir build
> cd build
> cmake ..
> make
- Run
NumberGenerators
target.Result: 42
should be displayed on the output. - Run
NumberGenerators-ut
target. - Fix mistakes in unit tests. In order to do that you need to implement
sumNumbersFromGenerators()
function to make all UTs pass. You can add more UTs if you wish. - Create a Pull Request to inform me about your successful implementation and environment setup. If you do not have and do not want to have a GitHub account just send me your solution (diff only) via email to lukasz@coders.school