Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » programmatically add target
programmatically add target [message #159269] Tue, 29 November 2005 07:02 Go to next message
Eclipse UserFriend
Originally posted by: Knadine.t-online.de

hello

I extended the cdt c++ project wizard so that it performs some additional
actions like creating some basic folders and copying some files in it...
I would now like to automatically create some targets, but I haven't
figured out how to do that. If I want to add a target to folder
myproject/subfolder1/subfolder2, how do I do that?

thx
sth_Weird

ps: reading a gnumakefile (using getdirectives()), is it possible to find
out if an include-directive is "optional" (-include)? I wanted to
automatically create a documentation of the contents of the makefile, but
the '-' seems to get lost when I load the gnumakefile :-(
more info [message #159325 is a reply to message #159269] Tue, 29 November 2005 14:41 Go to previous message
Eclipse UserFriend
Originally posted by: Knadine.t-online.de

maybe it will help if I post some of my code:

MakeTargetManager tgtManager = (MakeTargetManager) MakeCorePlugin
.getDefault().getTargetManager();

tgtManager.startup();

IMakeTarget tgt = (IMakeTarget)
tgtManager.createTarget(this.project, "mytargetname",
"org.eclipse.cdt.make.MakeTargetBuilder");

tgt.setUseDefaultBuildCmd(false);

tgt.setBuildAttribute(IMakeTarget.BUILD_LOCATION, "test/Prototyp");
tgt.setBuildAttribute(IMakeTarget.BUILD_TARGET, "testtarget");
tgt.setBuildAttribute(IMakeTarget.BUILD_COMMAND, "testcommand");

tgtManager.addTarget(tgt);

tgtManager.shutdown();

The target is always added directly to the Project-Folder, but I want to
place the target in a subfolder
Previous Topic:Difficulty with running a simple program
Next Topic:svn: Debug and Release under versioncontrol
Goto Forum:
  


Current Time: Tue Jul 02 18:21:36 GMT 2024

Powered by FUDForum. Page generated in 0.02969 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top