mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-01 11:18:09 -07:00
dev-lang/ispc: Add GPU support
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -21,12 +21,13 @@ SRC_URI="
|
||||
LICENSE="BSD BSD-2 UoI-NCSA"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
||||
IUSE="examples openmp test"
|
||||
IUSE="examples gpu openmp test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
<sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):=
|
||||
sys-libs/ncurses:=
|
||||
gpu? ( dev-libs/level-zero:= )
|
||||
!openmp? ( dev-cpp/tbb:= )
|
||||
"
|
||||
RDEPEND="
|
||||
@@ -57,6 +58,14 @@ src_prepare() {
|
||||
sed -i -e 's:set(target_arch "i686"):return():' cmake/GenerateBuiltins.cmake || die
|
||||
fi
|
||||
|
||||
# do not require bundled gtest
|
||||
mkdir -p ispcrt/tests/vendor/google/googletest || die
|
||||
cat > ispcrt/tests/vendor/google/googletest/CMakeLists.txt <<-EOF || die
|
||||
find_package(GTest)
|
||||
EOF
|
||||
# remove hacks that break unbundling
|
||||
sed -i -e '/gmock/d' -e '/install/,$d' ispcrt/tests/CMakeLists.txt || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
@@ -67,6 +76,7 @@ src_configure() {
|
||||
-DISPC_INCLUDE_EXAMPLES=OFF
|
||||
-DISPC_INCLUDE_TESTS=$(usex test)
|
||||
-DISPC_INCLUDE_UTILS=OFF
|
||||
-DISPCRT_BUILD_GPU=$(usex gpu)
|
||||
-DISPCRT_BUILD_TASK_MODEL=$(usex openmp OpenMP TBB)
|
||||
)
|
||||
cmake_src_configure
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
<remote-id type="github">ispc/ispc</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="gpu">
|
||||
Enable Level0 GPU support in ispcrt.
|
||||
</flag>
|
||||
<flag name="openmp">
|
||||
Build with OpenMP task model (otherwise, TBB task model is used).
|
||||
</flag>
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
#--- END OF EXAMPLES ---
|
||||
|
||||
# Michał Górny <mgorny@gentoo.org> (2023-12-31)
|
||||
# Requires dev-libs/level-zero.
|
||||
dev-lang/ispc -gpu
|
||||
|
||||
# Andrew Ammerlaan <andrewammerlaan@gentoo.org> (2023-12-18)
|
||||
# Experimental and only available on a subset of architectures
|
||||
sys-kernel/gentoo-kernel -generic-uki
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Michał Górny <mgorny@gentoo.org> (2023-12-31)
|
||||
# Requires dev-libs/level-zero.
|
||||
dev-lang/ispc gpu
|
||||
|
||||
# Andrew Ammerlaan <andrewammerlaan@gentoo.org> (2023-12-18)
|
||||
# Experimental and only available on a subset of architectures
|
||||
sys-kernel/gentoo-kernel generic-uki
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Michał Górny <mgorny@gentoo.org> (2023-12-31)
|
||||
# Requires dev-libs/level-zero.
|
||||
dev-lang/ispc gpu
|
||||
|
||||
# Andrew Ammerlaan <andrewammerlaan@gentoo.org> (2023-12-18)
|
||||
# Requires systemd
|
||||
sys-kernel/gentoo-kernel generic-uki
|
||||
|
||||
Reference in New Issue
Block a user