Installing VMC
VMC requires ROOT.
The VMC core package is maintained as a standalone vmc package. Current Geant4 VMC requires this standalone library; ROOT installations with the old embedded VMC enabled are rejected.
VMC uses CMake to configure a build system for compiling and installing the headers, libraries and Cmake configuration files. To install VMC:
- First get the VMC source from the Download page. We will assume that the VMC package sits in a subdirectory
/mypath/vmc- Create build directory alongside our source directory
$ cd /mypath
$ mkdir vmc_build
$ ls
vmc vmc_build- To configure the build, change into the build directory and run CMake:
$ cd /mypath/vmc_build
$ cmake -DCMAKE_INSTALL_PREFIX=/mypath/vmc_install /mypath/vmc-
If ROOT environment was defined using
thisroot.{c}shscript, there is no need to provide the path to its installation. Otherwise, they can be provided using-DROOT_DIRcmake option. -
The VMC core is built by default in
RelWithDebInfobuild mode (Optimized build with debugging symbols). This default can be changed via the standard CMake optionCMAKE_BUILD_TYPE. The other useful values areRelease: Optimized build, no debugging symbolsDebug: Debugging symbols, no optimization
- After the configuration has run, CMake will have generated Unix Makefiles for building VMC. To run the build, simply execute make in the build directory:
$ make -jNwhere N is the number of parallel jobs you require (e.g. if your machine has a dual core processor, you could set N to 2).
- If you need more output to help resolve issues or simply for information, run make as
$ make -jN VERBOSE=1- Once the build has completed, you can install VMC to the directory you specified earlier in CMAKE_INSTALL_PREFIX by running
$ make install