blob: e0464741ddf0d68091b14977cecb8bb967c6b6a8 (
plain)
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
|
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Fast and exact implementation of the C++ from_chars functions for number types"
HOMEPAGE="https://github.com/fastfloat/fast_float"
SRC_URI="https://github.com/fastfloat/fast_float/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="|| ( Apache-2.0 Boost-1.0 MIT )"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="test? ( dev-cpp/doctest )"
src_configure() {
local mycmakeargs=( -DFASTFLOAT_TEST=$(usex test) )
# Avoid passing these without USE=test to avoid cmake warning
# "Manually-specified variables were not used by the project"
if use test; then
mycmakeargs+=(
-DSYSTEM_DOCTEST=ON
# Unconditionally calls FetchContent
-DFASTFLOAT_SUPPLEMENTAL_TESTS=OFF
)
sed -i 's/-Werror//' tests/CMakeLists.txt || die
fi
cmake_src_configure
}
|