News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Project settings inheritance

Started by erodriguez, January 12, 2008, 11:27:02 PM

Previous topic - Next topic

erodriguez

Is there a mechanism to allow one project to inherit setting from another project. 

For example, project b depends on project a.  Project a sets its include paths and compiler defines, which will be necessary for building project b.  I'm looking for something similar to vsprops files in DevStudio 2005 or xcconfig files in XCode. 

Such a facility is really handy when dealing with large numbers of projects (I'm working with about 200) since it allows certain settings - compiler optimizations flags, global defines, output paths, etc to be specified in a single location which all projects can share.

mandrav

Quote from: erodriguez on January 12, 2008, 11:27:02 PM
Is there a mechanism to allow one project to inherit setting from another project. 

For example, project b depends on project a.  Project a sets its include paths and compiler defines, which will be necessary for building project b.  I'm looking for something similar to vsprops files in DevStudio 2005 or xcconfig files in XCode. 

Such a facility is really handy when dealing with large numbers of projects (I'm working with about 200) since it allows certain settings - compiler optimizations flags, global defines, output paths, etc to be specified in a single location which all projects can share.

Have a look at this.
Be patient!
This bug will be fixed soon...

erodriguez

Is it possible for a build script to include another one.  I'd like to be able to create a configuration specific script which then includes additional settings.  I tried using 'dofile' and 'loadfile' without success.

Something like:
bdstr_debug.script:
dofile(_T("../../../../../Project/make/CB/debug.script")) ;

local BDSTR_INCLUDE = ::wxArrayString();
BDSTR_INCLUDE.Add(_T("../../../../../Project/bdstr/include"), 1) ;

function SetBuildOptions(base)
{
   base.SetIncludeDirs(BDSTR_INCLUDE) ;
}

debug.script:
function SetBuildOptions(base)
{
    // enable debugging symbols
    base.AddCompilerOption(_T("-g"));
    // disable all optimizations
    base.AddCompilerOption(_T("-O0"));
}


mariocup

Hi erodrizguez,

you can include scripts in other scripts like this


Include(_T("..") + wxFILE_SEP_PATH + _T("flash.script"));


Bye,

Mario

mandrav

As mariocup said, Include() and Require() are supported (with Require() being the same as Include() with the exception that it raises an error if the file can't be found).
Be patient!
This bug will be fixed soon...