Building the Mantid Framework Code
From MantidProject
(Redirected from Building the Mantid Code)
Contents |
Building the code for the first time
First install the Mantid Prerequisites
You must run the following Python files before compiling the code for the first time, to create the necessary headers:
- C:\Mantid\Code\Mantid\release_version.py
and
- C:\Mantid\Code\qtiplot\release_date.py
Using Visual studio
- Open the solution file mantid.sln in C:\Mantid\Code\Mantid
- Select Build\Build Solution from the menus
Using Eclipse
See the instructions detailing Eclipse Setup.
Using Scons
This should work for both windows and linux.
- Go the the Code/Mantid directory
- Under linux, edit the Build/Scons_Linux.conf file if things such as boost and nexus are installed in non-standard locations by, for example, specifying NEXUS_ROOT=. Boost can also be configured to have a suffix, use BOOST_APPEND= for this, i.e. BOOST_APPEND=-mt
- type Build.bat (or build.sh). Flags to scons are passed through, so e.g. build.bat -c cleans up the build files.
The code will be build into the Mantid/release directory unless a debug build is requested (by passing the argument debug=1 to scons), in which case the libraries will be placed in the Mantid/debug directory.
Running "main" on Linux
- The "main" program is a small placeholder that runs test code.
- You need to be in the Code/Mantid/ folder and run the command "release/main", otherwise paths are not found! (N.B. This applies to the code in the checked in version as of May 2010 because of the relative paths in there, but the code in this file can be modified by anyone at any time)
Next: Running the unit tests
