Debian Codegraph @

INSTALL

raw
1
2 ## To compile and install fclib
3
4 cd SOME_BUILD_DIR
5 cmake path_to_fclib -DCMAKE_INSTALL_PREFIX=where_to_install_fclib
6 make
7 make install
8
9 More options to CMake:
10
11 -DWITH_DOCUMENTATION=ON -- build the documentation and web site
12
13 -DFCLIB_HEADER_ONLY=OFF -- build as a library (otherwise, the
14 default is that all functions are
15 contained in a single header)
16
17 -DFCLIB_WITH_MERIT_FUNCTIONS=OFF -- do not build merit functions
18
19 -DFORCE_SKIP_RPATH=ON -- do not use CMake's rpath support
20
21 -DUSE_SYSTEM_SUITESPARSE=OFF -- do not use the system-installed
22 SuiteSparse library but instead
23 use the one included with fclib
24
25 -DSKIP_PKGCONFIG=ON -- do not generate the fclib.pc file for the
26 pkg-config utility
27
28 -DHARDCODE_NOT_HEADER_ONLY=ON -- by default users must specify
29 FCLIB_NOT_HEADER_ONLY to use
30 fclib as a compiled library, but
31 this option puts this define
32 right into the installed header.
33
34 The default value for where_to_install_fclib is /usr/local.
35
36 If hdf5 is not in a standard place, just set var HDF5_ROOT before running cmake.
37 For example:
38
39 export HDF5_ROOT=/home/install/hdf5
40
41 To run tests :
42
43 make test
44
45
46 ## To use FCLib from another project
47
48 Add in CMakeLists.txt of the project:
49
50 find_package(FCLIB 3.1.0 CONFIG REQUIRED)
51 target_link_libraries(your_target PUBLIC FCLIB::fclib)
52
53
54 and run cmake like this:
55
56 with cmake > 12.:
57
58 cmake ... -DFCLib_ROOT=where_you_install_fclib
59
60 For older cmake :
61
62 cmake ... -DFCLib_DIR=where_you_install_fclib/lib/cmake/fclib-3.1.0
63
64 (i.e. the path to fclib-config.cmake file)
65
66
67 Alternatively use pkg-config like so:
68
69 gcc -o myprogram myprogram.c `pkg-config --libs --cflags fclib`
70
71 For all functions except merit ones, fclib may be used as a
72 header-only library.