Problem package - JeremyPouyet/cpp-gaf GitHub Wiki

Package design

To be loaded by open-gaf, a problem needs to be under the form of a package problem. It should contains:

  • The C++ source code of the problem (.cpp and .hh)
  • An INI configuration file
  • A Makefile that compiles a shared library (.so)

Package creation

There are two ways to create a package: From scratch, by creating every files, or by using the project generator that will generate every files needed by the framework, with a default Makefile, a default INI file and a C++ class that implements AProblem. To use it, proceed as follow:

$> cd template/  
$> ./generator test
Creation of the directory ../problems/test
Generation of file ../problems/test/Makefile
Generation of file ../problems/test/testProblem.cpp
Generation of file ../problems/test/testProblem.hh
Generation of file ../problems/test/problem.ini
$> cd ../problems/test/
$> ls
Makefile problem.ini testProblem.cpp testProblem.hh

Package compilation

The package can be compiled separately from the Framework:

$>  make -C problems/test/

Or thanks to makeAll.sh that will recompile the framework and each project:

$> make problems