12e5b6d6dSopenharmony_cihttps://github.com/google/double-conversion
22e5b6d6dSopenharmony_ci
32e5b6d6dSopenharmony_ciThis project (double-conversion) provides binary-decimal and decimal-binary
42e5b6d6dSopenharmony_ciroutines for IEEE doubles.
52e5b6d6dSopenharmony_ci
62e5b6d6dSopenharmony_ciThe library consists of efficient conversion routines that have been extracted
72e5b6d6dSopenharmony_cifrom the V8 JavaScript engine. The code has been refactored and improved so that
82e5b6d6dSopenharmony_ciit can be used more easily in other projects.
92e5b6d6dSopenharmony_ci
102e5b6d6dSopenharmony_ciThere is extensive documentation in `double-conversion/string-to-double.h` and
112e5b6d6dSopenharmony_ci`double-conversion/double-to-string.h`. Other examples can be found in
122e5b6d6dSopenharmony_ci`test/cctest/test-conversions.cc`.
132e5b6d6dSopenharmony_ci
142e5b6d6dSopenharmony_ci
152e5b6d6dSopenharmony_ciBuilding
162e5b6d6dSopenharmony_ci========
172e5b6d6dSopenharmony_ci
182e5b6d6dSopenharmony_ciThis library can be built with [scons][0] or [cmake][1].
192e5b6d6dSopenharmony_ciThe checked-in Makefile simply forwards to scons, and provides a
202e5b6d6dSopenharmony_cishortcut to run all tests:
212e5b6d6dSopenharmony_ci
222e5b6d6dSopenharmony_ci    make
232e5b6d6dSopenharmony_ci    make test
242e5b6d6dSopenharmony_ci
252e5b6d6dSopenharmony_ciScons
262e5b6d6dSopenharmony_ci-----
272e5b6d6dSopenharmony_ci
282e5b6d6dSopenharmony_ciThe easiest way to install this library is to use `scons`. It builds
292e5b6d6dSopenharmony_cithe static and shared library, and is set up to install those at the
302e5b6d6dSopenharmony_cicorrect locations:
312e5b6d6dSopenharmony_ci
322e5b6d6dSopenharmony_ci    scons install
332e5b6d6dSopenharmony_ci
342e5b6d6dSopenharmony_ciUse the `DESTDIR` option to change the target directory:
352e5b6d6dSopenharmony_ci
362e5b6d6dSopenharmony_ci    scons DESTDIR=alternative_directory install
372e5b6d6dSopenharmony_ci
382e5b6d6dSopenharmony_ciCmake
392e5b6d6dSopenharmony_ci-----
402e5b6d6dSopenharmony_ci
412e5b6d6dSopenharmony_ciTo use cmake run `cmake .` in the root directory. This overwrites the
422e5b6d6dSopenharmony_ciexisting Makefile.
432e5b6d6dSopenharmony_ci
442e5b6d6dSopenharmony_ciUse `-DBUILD_SHARED_LIBS=ON` to enable the compilation of shared libraries.
452e5b6d6dSopenharmony_ciNote that this disables static libraries. There is currently no way to
462e5b6d6dSopenharmony_cibuild both libraries at the same time with cmake.
472e5b6d6dSopenharmony_ci
482e5b6d6dSopenharmony_ciUse `-DBUILD_TESTING=ON` to build the test executable.
492e5b6d6dSopenharmony_ci
502e5b6d6dSopenharmony_ci    cmake . -DBUILD_TESTING=ON
512e5b6d6dSopenharmony_ci    make
522e5b6d6dSopenharmony_ci    test/cctest/cctest
532e5b6d6dSopenharmony_ci
542e5b6d6dSopenharmony_ci[0]: http://www.scons.org/
552e5b6d6dSopenharmony_ci[1]: https://cmake.org/
56