How to Compile Kratos in Debug mode

From KratosWiki
Revision as of 15:01, 16 July 2013 by Maceli (Talk | contribs)
Jump to: navigation, search

In order to compile Kratos in Debug mode, you have to edit your compilation script '' 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/ cmake_build_debug/

Then, edit '' by setting the Debug mode with:


Now you can compile the debug version of Kratos by doing:

   cd cmake_build_debug

And you can compile again the release version of Kratos by doing:

   cd ../cmake_build

Now, both versions coexist.

When you run a Python script that calls the Kratos library, it will call the last one you compiled.

Personal tools