CMake
CMake is used to build, test, and package software.
External Links:
CMake website
CMake tutorial
Loading CMake
There are various versions of CMake on Hazel. To see the various versions available, type module avail
and
ls /usr/local/apps/cmake*.
To set the environment, either source the appropriate script or load the default module
module load cmakeLoading CMake will put the following executables in the path:
ccmake cmake cpack ctest
Using CMake to compile 3rd party software
For general tips on compiling, see the following:
- List of compilers on Hazel
- Setting up the computing environment on Hazel: paths, libraries, and modules
- General guidance for installing software
To compile 3rd party software with CMake, begin by reading the README, FAQ, and any tutorials provided by the software. The general workflow for using cmake or ccmake is this:
- Get the software using wget, sftp, or git.
- Make a build directory and cd to it.
- Type cmake [source directory] (or ccmake [source directory]). If the build directory is inside the source directory, do
cmake ... - If CMake is unsuccessful, adjust your paths and libraries accordingly and try again.
- CMake generates a Makefile. Type
make, thenmake install, and if available domake checkormake test.
Last modified: October 27 2025 13:19:31.