Skip to content

Commit

Permalink
dev-cpp/nlohmann_json: (really) build tests conditionally
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/763177
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Jan 2, 2021
1 parent b35c030 commit b303773
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dev-cpp/nlohmann_json/nlohmann_json-3.9.1.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
Expand All @@ -25,18 +25,20 @@ DEPEND="doc? ( app-doc/doxygen )"
DOCS=( ChangeLog.md README.md )

src_configure() {
# Tests are built by default so we can't group the test logic below
local mycmakeargs=(
-DJSON_MultipleHeaders=ON
-DJSON_BuildTests=$(usex test)
)

if use test ; then
# Define test data directory here to avoid unused var QA warning
# #747826
mycmakeargs+=(
-DJSON_BuildTests=ON
-DJSON_TestDataDirectory="${S}/json_test_data"
)
fi

cmake_src_configure
}

Expand Down

0 comments on commit b303773

Please sign in to comment.