How to Compile Kratos in Debug mode
In order to compile Kratos in Debug mode, you have to edit your compilation script 'configure.sh' by changing the line begining with '-DCMAKE_BUILD_TYPE':
Instead of -DCMAKE_BUILD_TYPE=Release, type:
If your goal is to compile Kratos in Release mode, but containing all the source code information, instead of the previous option type:
Keeping both a Release and a Debug version of Kratos at the same time:
You will notice that switching from one compilation to another takes long, since all the source code is completely re-compiled when you change the compilation mode. A solution to this problem is to compile the code in different folders. This can be done by creating folders similar to the cmake_build folder. For instance, you can do this from the main kratos folder:
mkdir cmake_build_debug cp cmake_build/configure.sh cmake_build_debug/configure_debug.sh
Then, edit 'configure_debug.sh' by setting the Debug mode with:
Now you can compile the debug version of Kratos by doing:
cd cmake_build_debug sh configure_debug.sh
And you can compile again the release version of Kratos by doing:
cd ../cmake_build sh configure.sh
Now, both versions coexist.
When you run a Python script that calls the Kratos library, it will call the last one you compiled.