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