Skip to content

v1.6

Latest
Compare
Choose a tag to compare
@rohan-sawhney rohan-sawhney released this 16 May 06:39
· 5 commits to master since this release

While building BFF on Mac and Linux is fairly straightforward, building on Windows requires a fair amount of effort. Here are the steps I followed to build the command line executable for Windows x64:

  1. Follow these instructions to install SuiteSparse on your Windows machine.
  2. Use the Cmake GUI to generate a visual studio project:
  • Set "Where is the source code" to "C:/PATH_TO_BFF_DIRECTORY"
  • Set "Where to build the binaries" to "C:/PATH_TO_BFF_DIRECTORY/build"
  • Press Configure. At this point the Cmake GUI will ask you to specify paths to a number of Suitesparse directories such as SuiteSparse_CHOLMOD_DIR, SuiteSparse_CHOLMOD_INCLUDE_DIR, SuiteSparse_CHOLMOD_LIBRARY_DEBUG, SuiteSparse_CHOLMOD_LIBRARY_RELEASE (and similarly for AMD, BTF, CAMD, CCOLAMD, COLAMD, CXSPARSE, KLU, LDL, SPQR, SUITESPARSECONFIG, UMPACK). Set these paths as follows:
    -- SuiteSparse_CHOLMOD_DIR = "C:/PATH_TO_SUITESPARSE_DIRECTORY/build/install/lib"
    -- SuiteSparse_CHOLMOD_INCLUDE_DIR = "C:/PATH_TO_SUITESPARSE_DIRECTORY/build/install/include/suitesparse"
    -- SuiteSparse_CHOLMOD_LIBRARY_DEBUG = "C:/PATH_TO_SUITESPARSE_DIRECTORY/build/install/lib/libcholmod.lib"
    -- SuiteSparse_CHOLMOD_LIBRARY_RELEASE = "C:/PATH_TO_SUITESPARSE_DIRECTORY/build/install/lib/libcholmod.lib"
  • You will also have to specify BLAS and LAPACK directory paths for SuiteSparse:
    -- SuiteSparse_BLAS_LIBRARY = "C:/PATH_TO_SUITESPARSE_DIRECTORY/lapack_windows/x64/libblas.lib"
    -- SuiteSparse_ LAPACK_LIBRARY = "C:/PATH_TO_SUITESPARSE_DIRECTORY/lapack_windows/x64/liblapack.lib"
  • Press Generate and open the visual studio project "bff.sln" in the "C:/PATH_TO_BFF_DIRECTORY/build" directory.
  • You will then have to manually specify paths to link the x64 openblas dependency provided here for the various build targets (namely, bff, bff-command-line, bff-viewer) in visual studio:
    -- Select the target -> Properties -> C/C++ -> General -> Additional Include Directories, add "C:/PATH_TO_BFF_DIRECTORY/deps/openblas-windows/include"
    -- Select the target -> Properties -> Linker -> General -> Additional Library Directories, add "C:/PATH_TO_BFF_DIRECTORY/deps/openblas-windows/lib"
    -- Select the target -> Properties -> Linker -> Input -> Additional Dependencies, add "C:/PATH_TO_BFF_DIRECTORY/deps/openblas-windows/lib/libopenblas.lib" and "C:/PATH_TO_BFF_DIRECTORY/deps/openblas-windows/lib/libopenblas.dll.a".
  • For the bff visual studio target, also set bff -> Properties -> General -> Configuration Type to "Static library (.lib)" and bff -> Properties -> Advanced -> Target File Extension to ".lib".
  • Finally, build the target bff-command-line (and bff-viewer if desired).
  1. Run the bff-command-line executable by following the instructions provided here.