These brief instructions will help you get started to install FPChecker.
Edit me
Requirements
- Operating systems: Linux or MacOS (not all features supported in MacOS).
- Cmake (a recent version)
- Clang/LLVM: FPChecker is developed as an extension of the clang/LLVM compiler. Currently, the clang/LLVM version that is supported is 19.1.7.
- Python 3 (with matplotlib).
- Pytest (optional) to run the tests (see here).
Source Code
The source is available at github: https://github.com/LLNL/FPChecker
Checkout FPChecker:
$ git clone https://github.com/LLNL/FPChecker.git
Setting up Clang/LLVM
Clang and LLVM can be obtained and set up on your system through two primary methods: building from source or installing pre-built packages. To build it from source, see https://llvm.org/docs/GettingStarted.html.
Installing pre-built packages is the simplest and most common way to get Clang and LLVM. In Ubuntu, apt
can be used.
Another practical way to install it is using Conda environments:
$ conda install llvmdev=19.1.7 -c conda-forge
$ conda install clangxx=19.1.7 -c conda-forge
Checking Prerequisites
Before building, check that the supported version of clang++
is in your path:
$ clang++ --version
clang version 19.1.7
...
Check that the llvm-config
command is in your path:
$ llvm-config --version
19.1.7
Building
FPChecker is built using a recent version of cmake
.
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/install ..
$ make && make install
Note: Note that cmake will attempt to search for
clang++
and llvm-config
in your path. So make sure these commands are visible in the environment before building.Testing
To run the tests, use ctest
in the build directory:
$ ctest -V