-
Notifications
You must be signed in to change notification settings - Fork 64
Build McStas or McXtrace via basic CMake
Peter Willendrup edited this page Jan 19, 2026
·
2 revisions
We generally recommend building via either our
- Our conda-forge utility scripts: Build your own McStas or McXtrace via conda‐forge
- Our legacy build-scripts Building McStas/McXtrace
You may however build McStas or McXtrace using basic CMake commands, after installing basic build-dependencies yourself:
cmake- A c99-capable compiler and basic build dependencies
(Debiangcc build-essential) - LeX and Yacc (aka. Flex and Bison)
(Debianflex bison)
- A Fortran compiler to allow building cif2hkl
(Debiangfortran) - A LaTeX system to build the manual(s)
(Debiantexlive poppler-utils texlive-latex-extra texlive-bibtex-extra texlive-pstricks texlive-science - Tools to build “metapackages”
(Debianequivs)
(An updated list of dependencies can be found via our conda dependency tool or our legacy dependency scripts
Proceed as normal, i.e.
- From your repo-checkout (
cd McCode) create a build directory (mkdir build) and enter that (cd build) - Run
cmake .. -DBUILD_MCXTRACE=ONorcmake .. -DBUILD_MCSTAS=ON - Run
cmake --build .to build - Run
cmake --install .to install Please refer to CMake documentation for further details