README.md
1https://github.com/google/double-conversion
2
3This project (double-conversion) provides binary-decimal and decimal-binary
4routines for IEEE doubles.
5
6The library consists of efficient conversion routines that have been extracted
7from the V8 JavaScript engine. The code has been refactored and improved so that
8it can be used more easily in other projects.
9
10There is extensive documentation in `double-conversion/string-to-double.h` and
11`double-conversion/double-to-string.h`. Other examples can be found in
12`test/cctest/test-conversions.cc`.
13
14
15Building
16========
17
18This library can be built with [scons][0] or [cmake][1].
19The checked-in Makefile simply forwards to scons, and provides a
20shortcut to run all tests:
21
22 make
23 make test
24
25Scons
26-----
27
28The easiest way to install this library is to use `scons`. It builds
29the static and shared library, and is set up to install those at the
30correct locations:
31
32 scons install
33
34Use the `DESTDIR` option to change the target directory:
35
36 scons DESTDIR=alternative_directory install
37
38Cmake
39-----
40
41To use cmake run `cmake .` in the root directory. This overwrites the
42existing Makefile.
43
44Use `-DBUILD_SHARED_LIBS=ON` to enable the compilation of shared libraries.
45Note that this disables static libraries. There is currently no way to
46build both libraries at the same time with cmake.
47
48Use `-DBUILD_TESTING=ON` to build the test executable.
49
50 cmake . -DBUILD_TESTING=ON
51 make
52 test/cctest/cctest
53
54[0]: http://www.scons.org/
55[1]: https://cmake.org/
56