Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As I understand it, your config library is shared over different projects and uses different defines for each project.</p> <p>It's not possible to overcome recompilation in that case, irrespective of boost build.or any other build system. In between compiles of the cpp files the preprocessed files <em>have</em> changed.</p> <p>If you want to avoid recompilation one option is to split of the config library into different libraries for each project, but depending on what <code>config</code> looks like, having a lot of code duplication is rarely desireable either...</p> <p>The only other option I can think of is reducing the amount of code that needs to be recompiled every time.</p> <p>e.g. you have a sourcefile <code>LargeFunction.cpp</code> with</p> <pre><code> #if CONFIG_DEFINE_1 void VeryLargeFunction() { ... } #elif CONFIG_DEFINE_2 void VeryLargeFunction() { ... } #endif </code></pre> <p>Split it into three files, one containing the VeryLargeFunction as defined for DEFINE_1, one as defined for DEFINE_2, and one which simply includes these two based on the values of the defines.</p> <pre><code> #if CONFIG_DEFINE_1 #include "definitionFileFor1" #elif CONFIG_DEFINE_2 #include "definitionFileFor2" #endif </code></pre> <p>This file still needs to be recompiled every time, but the object files which contain the 'real' code, will not.</p> <p>You'll effectively only relink existing object files on every compile, i.s.o. recompiling everything. </p> <p>The disadvantage is more maintenance though, and the different function definitions reside in different files, so the code becomes a bit harder to read.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload