[Scons-users] Can SCons do this?
Strand, Kyle J
kyle.strand at beckman.com
Tue Jan 15 16:07:32 EST 2013
I would also like this SCONS-to-JSON and JSON-to-IDE code, since I'm in the middle of a similar project as well. Thanks!
________________________________
Kyle Strand, Software Intern
Beckman Coulter, Inc., Life Sciences Division
4862 Innovation Drive, Fort Collins, Colorado, 80525
(970) 204-7036
________________________________
From: scons-users-bounces at scons.org [scons-users-bounces at scons.org] on behalf of Jason Swager [jswager at alohaoi.com]
Sent: Tuesday, January 15, 2013 8:14 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Can SCons do this?
Francis,
By chance, would you be willing to make that SCONS-to-JSON and JSON-to-IDE-projects code available to the community. The company I work for is currently in the midst of doing this and something like your code would be a big help.
Thanks,
Jason Swager
On Tue, Jan 15, 2013 at 5:52 AM, Francis Bolduc <fbolduc at gmail.com<mailto:fbolduc at gmail.com>> wrote:
> I do prefer to develop on Windows, because Visual Studio (VS) has a nice
> MPI debugger. I wonder if I can use SCons to generate the project\solution
> files for VS, so I won't need to update both SCons script and VS project. My
> workfllow would be to add whatever I need to SCons, regenerate the VS
> project, continue to work with VS. At what extent is this supported? What
> about VS versions?
>
> Another example: I currently #define quite a lot of stuff for the build.
> Would it be possible to propagate these into the VS project as well?
This is my situation at work. Most of our developers would not feel
comfortable not having an IDE, therefore we generate projects for all
the different IDE (MSVS2005, MSVS2008, MSVS20010, QtCreator2, XCode,
CppCheck, etc.) using the same informations required to build the
binaries from the SConscript files.
There is some support in SCons to do project generation, but it wasn't
sufficient for my needs so I ended up doing project generation
manually myself. I use a two-pass technique that works very well.
In the first pass, I do a normal SCons run, but with a special command
line option that hijacks the Program, Library and SharedLibrary
builders. Instead of compiling binaries, they dump all the
informations they have (list of include directory, list of #define,
list of libraries to link with, list of source files, name of binary,
etc.) into a JSON file.
After that, I run a simply Python script that reads the JSON file and
generates the proper project files. I have one script per type of
projects. This allows me to have a maximum of control on what is
generated, especialy the build command, because I use a top-level
Makefile on top of SCons.
> On what extent is SCons aware of compiler flags and where they are in my
> VS project file? So for example I want to set the warning level flag in VS
> (which is different from g++ or xlC) — can I do it in SCons in a way that it
> is propagated into my VS project file?
>
> What would happen if SCons is not aware of the mapping of my particular
> option to a certain element of project file? For example, the next version
> of VS is going to introduce a /magic flag, that I can set in some nested
> dusty corner of configuration GUI. I suspect, that even if I manually tell
> SCons to use /magic, as a compilation flag, it won't be able to set it in
> the VS project file: when I generate the project file with SCons and open it
> in VS the /magic is not going to be turned on.
Through manual project generation you can achieve anything, but you
need to know everything about those project files. SCons will tell you
all the flags, but it's up to you to put it at the right place.
You can also try your luck with the default project generation
provided with SCons. Maybe it'll work for you.
_______________________________________________
Scons-users mailing list
Scons-users at scons.org<mailto:Scons-users at scons.org>
http://four.pairlist.net/mailman/listinfo/scons-users
Please be advised that this email may contain confidential
information. If you are not the intended recipient, please notify us
by email by replying to the sender and delete this message. The
sender disclaims that the content of this email constitutes an offer
to enter into, or the acceptance of, any agreement; provided that the
foregoing does not invalidate the binding effect of any digital or
other electronic reproduction of a manual signature that is included
in any attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130115/7f88d7d6/attachment.html>
More information about the Scons-users
mailing list