Hi,
I'm basing off the QMake plugin in order to create a scons build script generation
I'm seeing that QMake relies on the user picking a selection about the type of target(console, static lib or dyn lib). see https://codelite.svn.sourceforge.net/sv ... rojdlg.cpp
Isn't this redundant? Does this suggests that there is no explicit way to retrieve the targets for a given project? I would expect the api to return at least one target per project, with such information
target info
-
- CodeLite Enthusiast
- Posts: 11
- Joined: Wed Oct 31, 2012 4:34 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: target info
The easiest way to retrieve the build configuration is by simply calling:
To get the "Debug" build configuration info:
To get the selected build configuration, simply leave the requested build configuration empty:
OR:
You can look for the project:
Next, you can explore the build configurations (aka: targets)
Eran
To get the "Debug" build configuration info:
Code: Select all
BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjBuildConf( "project-name", "Debug" );
Code: Select all
BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjBuildConf( "project-name", "" );
You can look for the project:
Code: Select all
wxString errMsg;
ProjectPtr project = WorkspaceST::Get()->FindProjectByName("MyProject", errMsg);
Code: Select all
ProjectSettingsPtr settings = project->GetSettings();
ProjectSettingsCookie cookie;
BuildConfigPtr buildConfig = settings->GetFirstBuildConfiguration(cookie);
while ( BuildConfig ) {
buildConfig = settings->GetNextBuildConfiguration(cookie);
// DO something with the build-configuration
wxString targetName = buildConfig->GetName();
}
Make sure you have read the HOW TO POST thread