|Rosetta 3.2.1 Release Manual|
This Page in Under Constructionlast modified: 11/08/2008
Rosetta uses a custom SCons builder. The builder allows multiple build configurations. This page UsingScons demonstrates some simple features of the build system followed by a more detailed discussion of the build system structure and how it can be extended.
Note that scons-local is packaged with Rosetta3. Thus if scons is not installed on your system replace all the folllowing "scons" calls with "python external/scons-local/scons.py"
In order to build release executables, add the flag 'mode=release' like this:
scons bin mode=release
To display more rosetta specific build options call scons -h To display general scons build options call scons -H
A user can restrict compilation of the the devel and pilot_apps. On issuing the call
scons bin my
scons bin my_pilot_apps
SCons will read from src/devel.src.settings and src/pilot_apps.src.settings rather than src/devel.src.settings.all and src/pilot_apps.src.settings.all This cuase SCons to build only the sources listed in src/devel.src.settings and src/pilot_apps.src.settings with the needed dependencies.
Build the target <project> with default settings
scons <project> scons core scons protocols
Build only the sources of <project> in <subdirectory>
scons <project>/<subdirectory> scons core/chemical
Build only <objectfile>. Note that the extension is "os" for a shared object. For a static build this would "o".
scons <project>/<path/<objectfile> scons protocols/rna/RNA_ProtocolUtil.os
Build and install executables in bin/ directory
Build and install executables in bin/ directory if current working directory is a sub-directory mini. -D options tells scons to iteratively search towards the root for SConstruct file. The # sign is an alias for the top build directory.
scons -D bin
scons bin scons bin pilot_apps_all
Build restricted set of pilot_apps and devel sources listed in src/pilot_apps.src.settings.my and src/devel.src.settings.my
scons bin my scons bin my_pilot_apps
Build and install a particular executable in the bin directory
scons bin/exec scons bin/benchmark.linuxgccdebug scons mode=release bin/benchmark.linuxgccrelease
Build in release mode (~10x faster executable)
Build static libraries and exectuables instead of shared libraries.
Build and run unit tests. (Note the sources must be built first.)
scons cat=test python test/run.py
Parallelize build into 3 threads (faster on multiproc. machine). In fact some source recommend starting twice as many threads as available processors (Not quite sure this makes sense or a difference).
Use the version of scons that is distributed with mini. Useful for when scons is not installed on system