Useful CMake cache variables¶
Cache variables are passed as options to CMake using -D...
- CMAKE_BUILD_TYPE
CMake build type.
For production builds with -O3 optimisation enabled, use -DCMAKE_BUILD_TYPE=Release.
For debugging builds with -O2 optimisation and debug symbols enabled, use -DCMAKE_BUILD_TYPE=RelWithDebInfo.
For builds using CUDA device emulation, use -DCMAKE_BUILD_TYPE=DeviceEmu.
- CMAKE_PREFIX_PATH
Path to third-party libraries, e.g. -DCMAKE_PREFIX_PATH=$HOME/usr.
This variable is only needed if libraries are installed in non-standard paths.
- HALMD_USE_STATIC_LIBS
- Compile separate, statically linked executable for each backend.
- Boost_USE_STATIC_LIBS
Link to Boost libraries statically.
Recommended value is -DBoost_USE_STATIC_LIBS=TRUE.
- HDF5_USE_STATIC_LIBS
Link to HDF5 libraries statically.
Recommended value is -DHDF5_USE_STATIC_LIBS=TRUE.
- LUA_USE_STATIC_LIBS
Link to Lua libraries statically.
Recommended value is -DLUA_USE_STATIC_LIBS=TRUE.
- HALMD_WITH_GPU
Forcibly enable or disable GPU support.
By default, GPU support is enabled or disabled depending on whether CUDA is available. If HALMD_WITH_GPU is explicitly set to TRUE, CMake will fail if CUDA is not available. If HALMD_WITH_GPU is explicitly set to FALSE, GPU support will be disabled even if CUDA is available.
- HALMD_POTENTIALS
- Semicolon-separated list of potential modules that shall be instantiated. By default, all available potentials are enabled.
- HALMD_VARIANT_FORCE_DSFUN
Use double-single precision functions in force summation (GPU backend only).
Default value is TRUE.
- HALMD_VARIANT_HILBERT_ALT_3D
Use alternative vertex rules for the 3D Hilbert curve used for particle ordering (GPU backend only).
Default value is FALSE.
- HALMD_VARIANT_HOST_SINGLE_PRECISION
Use single-precision math in host implementation (host backend only).
Default value is FALSE.
This option requires SSE, which is enabled by default on x86_64.
- HALMD_VARIANT_VERLET_DSFUN
Use double-single precision functions in Verlet integrator (GPU backend only).
Default value is TRUE.