Note that there are some explanatory texts on larger screens.

plurals
  1. POBoost.Build conditional library compilation per-project
    primarykey
    data
    text
    <p>I have C++ project that are built using Boost.Build. The project consists of 3 subprojects.</p> <pre> . [root] \-- source \-- common \-- config \-- config.cpp \-- project_1 \-- Jamfile.jam \-- project_2 \-- Jamfile.jam \-- project_3 \-- Jamfile.jam \-- Jamroot.jam </pre> <p>Jamroot.jam:</p> <pre> project my_project : requirements multi debug:DEBUG : default-build static : build-dir bin ; alias project_1 : source/project_1 ; alias project_2 : source/project_2 ; alias project_3 : source/project_3 ; install dist : project_1 project_2 project_3 : on EXE ; </pre> <p>Each project has Jamfile.jam according to this template:</p> <pre> project project_N : requirements CONFIG_DEFINE_1= CONFIG_DEFINE_2= ; lib config : [ glob ../common/config/*.cpp ] ; exe project_N : [ glob *.cpp ] config : ; </pre> <p><code>config.cpp</code> uses defines <code>CONFIG_DEFINE_1</code> and <code>CONFIG_DEFINE_2</code> for conditional compilation (actually they are simply constants), so there's a separate version of <code>config</code> library per project.</p> <p>The problem is that such approach causes the <code>config</code> library to be rebuilt each time the whole project is built regardless of were the files changed or not. I.e. building the first time everything is compiled and linked, building the second time without doing any modifications - only the <code>config</code> library is built for each <code>project_N</code>. How should I properly setup the building so no redundand compilation occur?</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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