commit | 2d657b9afcbf90eecb71e6c8eab424fa4c6c8dbe | [log] [tgz] |
---|---|---|
author | Carbo Kuo <BYVoid@users.noreply.github.com> | Wed Nov 13 11:05:18 2024 -0500 |
committer | GitHub <noreply@github.com> | Wed Nov 13 17:05:18 2024 +0100 |
tree | 1a5963f5f5d3c276e68c8d1de132058806b29c38 | |
parent | c200fa285e42f405a36bbec6f1c32e50ee4f5680 [diff] |
Remove the explicit dependency on rules_cc. (#235) In general, `cc_library` and `cc_test` do not need an explicit load. By removing it, we can remove the explicit dependency to `rules_cc` in `MODULE.bazel`. This makes the dependency management easier. Nothing should be broken by this change.
https://github.com/google/double-conversion
This project (double-conversion) provides binary-decimal and decimal-binary routines for IEEE doubles.
The library consists of efficient conversion routines that have been extracted from the V8 JavaScript engine. The code has been refactored and improved so that it can be used more easily in other projects.
There is extensive documentation in double-conversion/string-to-double.h
and double-conversion/double-to-string.h
. Other examples can be found in test/cctest/test-conversions.cc
.
This library can be built with scons, cmake or bazel. The checked-in Makefile simply forwards to scons, and provides a shortcut to run all tests:
make make test
The easiest way to install this library is to use scons
. It builds the static and shared library, and is set up to install those at the correct locations:
scons install
Use the DESTDIR
option to change the target directory:
scons DESTDIR=alternative_directory install
To use cmake run cmake .
in the root directory. This overwrites the existing Makefile.
Use -DBUILD_SHARED_LIBS=ON
to enable the compilation of shared libraries. Note that this disables static libraries. There is currently no way to build both libraries at the same time with cmake.
Use -DBUILD_TESTING=ON
to build the test executable.
cmake . -DBUILD_TESTING=ON make test/cctest/cctest
The simplest way to adopt this library is through the Bazel Central Registry.
To build the library from the latest repository, run:
bazel build //:double-conversion
To run the unit test, run:
bazel test //:cctest