[Scons-users] Question about scons

Guillaume Anciaux guillaume.anciaux at epfl.ch
Tue Feb 9 18:06:13 EST 2016


Dear Dirk,

thanks for your quick answers.
Please see some of my comments inline>>

On 02/09/2016 07:12 PM, Dirk Bächle wrote:
> Yes, there is currently no repo or collection of tools, specialising
> in the task of finding external programs and libraries (such as Boost,
> for example) and configuring the build environment.
> We have basic support for "pkg-config", parsing the returned flags and
> adding them to variables like CXXFLAGS or LIBS.
Oki I understand.
>  
>
> If you'd like to start such a repo, just go right ahead I'd say. Such
> a contribution would be more than welcome! If this direction proves to
> be fruitful, we should think about ways how to integrate these "custom
> contributions" into the SCons distribution.
> My ideal approach would be to have the current "core sources" as the
> basic distro that has to be installed.
> On top of that, users can then decide to install a "contrib"
> package/distro, which blends in with the "core" package such that the
> user can call the provided add-ons right away (and doesn't have to
> mess around with search paths and such).
> Just an idea though...
Oki I can give it a try. I just need to read some more concerning the
scons 'tools' and how exactly they configure an environment.

Let me describe what CMake is doing: when you need some external library
(does not have to be a builder) you write something like:

find_package(PETSc,3.0,some_more_config_options)

Then there is a script FindPETSC.cmake somewhere (there is a standard
search path and you can define your own) which most of the time sets
some variable that you are free to use as you wish:

- include_dir (PETSC_INCLUDE_DIRS)
- library (a list) (PETSC_LIBRARIES)
- version (PETSC_VERSION)
- other specific info on what was detected on the system

Thus it means that such a script DO NOT configure automatically the
compiler flags (sorry I do not quite know the exact vocabulary of scons
yet).

I guess this is just a tool from scons point of view ?

My interest, as a computational scientist, is to try to port mainly the
important scientific libraries available on linux distributions and
maybe also on OSX/Windows. Starting incrementally with what is available
in CMake that is not in Scons.

>> - write an exporter from the CMake format to benefit from the long list
>> of packages already supported ?
>
> I already started a CMake to SCons converter, you might want to check
> it out at:
>
>   https://bitbucket.org/dirkbaechle/cmake2scons
>
> , there is still a lot of functionality missing...but it may be better
> than starting from scratch. Your pull requests are welcome! ;)
Thank you so much, I will have a look.

Best,

Guillaume

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1513 bytes
Desc: OpenPGP digital signature
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160210/5c3fd5e7/attachment.pgp>


More information about the Scons-users mailing list