CDT and SCons [message #75630] |
Mon, 14 July 2003 22:03 |
Eclipse User |
|
|
|
Originally posted by: lothar.xcerla.com
Has anyone tried to integrate SCons (http://www.scons.org/) into
eclipse? Eclipse already knows all the files in the directories and
could generate automatically files imported by SConstruct. What's needed
is something like one line per file which looks like:
env.SharedObject(target = 'eee.o', source = 'eee.cpp')
or
env.StaticObject(target = 'bbb.o', source = 'bbb.cpp')
depending if shared or static libraries are to be buildt.
Lothar
|
|
|
Re: CDT and SCons [message #75717 is a reply to message #75630] |
Tue, 15 July 2003 20:48 |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
Lothar Werzinger wrote:
> Has anyone tried to integrate SCons (http://www.scons.org/) into
The link does not seem to work.
> eclipse? Eclipse already knows all the files in the directories and
> could generate automatically files imported by SConstruct. What's needed
> is something like one line per file which looks like:
> env.SharedObject(target = 'eee.o', source = 'eee.cpp')
> or
> env.StaticObject(target = 'bbb.o', source = 'bbb.cpp')
> depending if shared or static libraries are to be buildt.
You would need to create a new Eclipse builder and set it to the project
I suppose that would be one way of implementing.
> Lothar
|
|
|
|
Re: CDT and SCons [message #83093 is a reply to message #75630] |
Wed, 15 October 2003 05:00 |
Eclipse User |
|
|
|
Originally posted by: john.mlist.arrizza.com
"Lothar Werzinger" <lothar@xcerla.com> wrote in message
news:bev9dm$12d$1@eclipse.org...
> Has anyone tried to integrate SCons (http://www.scons.org/) into
> eclipse? Eclipse already knows all the files in the directories and
> could generate automatically files imported by SConstruct. What's needed
> is something like one line per file which looks like:
>
> env.SharedObject(target = 'eee.o', source = 'eee.cpp')
> or
> env.StaticObject(target = 'bbb.o', source = 'bbb.cpp')
>
> depending if shared or static libraries are to be buildt.
If you're willing to tolerate a more manual-intensive solution:
Here's the SConstruct, assuming an executable is being built:
import glob
env = Environment(tools=['mingw'])
env.Program(target='mytarget', source = Split(glob.glob('*.cpp')))
The build command is:
scons .
This is on a Win32 platform using mingw. To compile using MSVC, even easier:
import glob
env = Environment()
env.Program(target='mytarget', source = Split(glob.glob('*.cpp')))
Not as nice as you're proposing but very simple. I do like makefiles, but
IMO this script is much easier to maintain.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 10/9/2003
|
|
|
|
|
Re: CDT and SCons [message #124647 is a reply to message #124569] |
Thu, 21 October 2004 23:43 |
Eclipse User |
|
|
|
Originally posted by: lothar.xcerla.com
Remy Rakic wrote:
> Actually, i believe the view 'make targets' allows you to choose which
> command to execute, so you could create a target that launches scons. Or
> anything else for that matter.
>
> hope that helps
>
>
> Lothar Werzinger wrote:
>
>> Has anyone tried to integrate SCons (http://www.scons.org/) into
>> eclipse?
I solved the problem myself by creating a SCons Builder plugin.
This plugin allows to build C/C++ projects with the SCons build tool. In
order to use it you must install SCons first. I tested it with release
0.95, but it should work also with newer versions. The source of the plugin
is included.
Maybe you can look at the plugin and mention it in your magazine.
The plugin can be installed/updated easily through Eclipse built-in
Install/Update Mechanism. Just add
http://nic-nac-project.de/~lothar/eclipse/update/ to your list of Update
Sites. Please see the Eclipse help for information on installing feature
plugins through Eclipse's Update Mechanism.
For more information see
http://nic-nac-project.de/~lothar/eclipse/update/SConsBuilde rPlugin.html
Please let me know your opinions about the plugin.
The plugin is also registed at http://eclipse-plugins.2y.net and users can
rate it at http://eclipse-plugins.2y.net/eclipse/plugin_details.
Lothar
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03748 seconds