This page contains more detailed instructions to compile a full-featured version of Gmsh, including the compilation of common dependencies: OpenCASCADE and FLTK. In addition to CMake and C++ and C compilers, you should have (preferably optimized) versions of the BLAS and LAPACK libraries on your system (e.g. OpenBLAS, ATLAS or the MKL).
OpenCASCADE is a free CAD kernel that Gmsh uses extensively for constructive solid geometry and for importing STEP files. To compile OpenCASCADE, download and uncompress the sources from the official site, then (here for occt 7.1.0):
cd opencascade-7.1.0 mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_MODULE_Draw=0 -DBUILD_MODULE_Visualization=0 -DBUILD_MODULE_ApplicationFramework=0 .. # Notes: # * if you don't have root access, add -DCMAKE_INSTALL_PREFIX=path-to-install sudo make install
Gmsh's default graphical user interface uses the FLTK widget toolkit. To compile FLTK:
svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3 cd fltk-1.3 make install
You can then compile Gmsh as follows:
git clone http://gitlab.onelab.info/gmsh/gmsh.git cd gmsh mkdir build cd build cmake .. # Notes: # * to build a distributed memory (MPI) capable version add the option -DENABLE_MPI=1 # * for a list of all available configuration options see http://gmsh.info/doc/texinfo/gmsh.html#Compiling-the-source-code make