Author Topic: Project settings inheritance  (Read 4994 times)

Offline erodriguez

  • Single posting newcomer
  • *
  • Posts: 2
Project settings inheritance
« 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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Project settings inheritance
« Reply #1 on: January 13, 2008, 12:38:46 am »
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...

Offline erodriguez

  • Single posting newcomer
  • *
  • Posts: 2
Re: Project settings inheritance
« Reply #2 on: April 11, 2008, 05:46:15 am »
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

  • Guest
Re: Project settings inheritance
« Reply #3 on: April 11, 2008, 09:26:15 am »
Hi erodrizguez,

you can include scripts in other scripts like this

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

Bye,

Mario

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Project settings inheritance
« Reply #4 on: April 11, 2008, 10:03:01 am »
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...