programmatically add target [message #159269] |
Tue, 29 November 2005 02:02  |
Eclipse User |
|
|
|
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 09:41  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03430 seconds