FastANI build and installation guide ==================================== Requirements ------------ - CMake 3.2 or newer - A C++11 compiler with OpenMP support - GCC >= 4.8 on Linux - Clang >= 3.3 on macOS - Zlib - One of: - GNU Scientific Library (GSL) - Boost macOS note: - If you build with Clang, install `libomp` so OpenMP is available. Recommended performance build ----------------------------- For best runtime performance, build FastANI in `Release` mode: ```sh rm -rf build cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build -j ``` This default release build favors portability across machines. If you want a host-optimized local benchmark build, enable: ```sh cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DFASTANI_NATIVE_OPTIMIZATION=ON ``` This produces the executable at: ```text build/fastANI ``` If you want debug symbols while still keeping optimized code for benchmarking, you can use: ```sh rm -rf build cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo cmake --build build -j ``` Install to a prefix ------------------- To install FastANI under a specific prefix: ```sh rm -rf build cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install cmake --build build -j cmake --install build ``` This installs the executable to: ```text /path/to/install/bin/fastANI ``` If you do not set `CMAKE_INSTALL_PREFIX`, the default is typically `/usr/local`, which may require elevated privileges during installation. Dependency configuration ------------------------ If CMake cannot find GSL or Boost automatically, you can provide paths explicitly during configuration. Examples: ```sh cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGSL_ROOT_DIR=/path/to/gsl ``` ```sh cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=/path/to/boost ``` Useful CMake options -------------------- `-DCMAKE_INSTALL_PREFIX=/path/to/install` - Install prefix used by `cmake --install build`. `-DGSL_ROOT_DIR=/path/to/gsl` - Location of a non-default GSL installation. `-DGSL_SHARED=OFF` - Statically link GSL instead of dynamically. `-DBOOST_ROOT=/path/to/boost` - Use Boost from this location instead of GSL discovery defaults. `-DBUILD_TESTING=ON` - Build the test suite. This requires initializing submodules first with `git submodule update --init --recursive`. `-DFASTANI_NATIVE_OPTIMIZATION=ON` - Add `-march=native` for host-optimized local builds. This can improve speed on the current machine, but it reduces portability and can make binaries harder to compare across systems. Notes ----- - `Release` builds are recommended for actual performance evaluation. - Fresh clones build the `fastANI` executable by default without requiring test submodules. - If you want to build tests, initialize submodules first and configure with `-DBUILD_TESTING=ON`. - If you are running directly from the build tree, invoke `build/fastANI`. - If you install FastANI, you can invoke it as `fastANI` once the install prefix `bin/` directory is on your `PATH`.