forked from wardsimon/CFML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
107 lines (72 loc) · 3.82 KB
/
README
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
CMake is a system used to control the software compilation process using simple platform
and compiler independent configuration files. CMake generates native makefiles and
workspaces that can be used in the compiler environment of your choice.
Here are the instructions to run cmake in order to build the CrysFML library.
***
1) download and install a recent version of cmake (>= 2.8.0 required)
***
2) check that the cmake binary directory is in the PATH altogether
with the different compilers that will be used for the build.
***
3) set the environment variable CRYSFML to the directory where the README is
located.
***
4) create a directory wherever you want that will contain the files
generated during the build (e.g. ${CRYSFML}/build).
If you intend to do the build as superuser, this directory should
give recursively the writing rights for every user.
Now you are ready for the cmake run that will configure your build.
***
5) change directory to the build directory created in step 4.
***
6) the CMake usage is:
cmake -G generator -Dvariable=value path_to_your_source_directory
generator:
CMake requires to know for which build tool it shall generate
files (GNU make, Visual Studio, Xcode, etc). If not specified
on the command line, it tries to guess it based on you
environment. Once identified the build tool, CMake uses the
corresponding Generator for creating files for your build tool.
You can explicitly specify the generator with the command line
option -G "Name of the generator".
For knowing the available generators on your platform, execute
cmake --help
This will list the generator's names at the end of the help text.
Take care the generator's names are case-sensitive.
For standard console Makefiles the generator should be:
- "NMake Makefiles" on Windows
- "Unix Makefiles" on Linux
variable:
Variables customize how the build will be generated.
Useful CMake variables (case sensitive):
* USE_HDF: ON|OFF.
Default OFF
If ON, CrysFML will be able to read NeXuS input data files.
* GUI: ON|OFF.
Default OFF
If OFF, only CrysFML will be built.
If ON, both CrysFML and WCrysFML libraries will be built
* CMAKE_Fortran_COMPILER: ifort|g95|gfortran.
Default ifort.
Sets the compiler to use for the build.
* CMAKE_BUILD_TYPE: Release|Debug|RelWithDebInfo|MinSizeRel.
Default Release.
Sets the build type for make based generators.
* CMAKE_INSTALL_PREFIX
Default /usr/lib/libcrysfml (Unix) C:\Program Files\libcrysfml (Windows).
Path where the library will be installed if "make install" is invoked or the
"INSTALL" target is built.
* CRYSFML_PREFIX
Default crysfml.
Sets the name of the subdirectory within CMAKE_INSTALL_PREFIX where
crysfml will be installed.
* WCRYSFML_PREFIX
Default wcrysfml.
Sets the name of the subdirectory within CMAKE_INSTALL_PREFIX where
wcrysfml will be installed.
***
7) the final step is now to build and install the library. The command to invoke will
depend on the generator used for the build.
Examples:
- Unix: make install
- Window: nmake install