diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-12-31 16:25:38 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-12-31 16:29:41 +0100 |
commit | ce3d65e1b44bb998f85628b3ee83fe028f4e7d32 (patch) | |
tree | 3c06830e5b991fedaf63499d4ca5b81273090866 /dev-lang/ispc | |
parent | dev-lang/ispc: Add OpenMP task model support (diff) | |
download | gentoo-ce3d65e1b44bb998f85628b3ee83fe028f4e7d32.tar.gz gentoo-ce3d65e1b44bb998f85628b3ee83fe028f4e7d32.tar.bz2 gentoo-ce3d65e1b44bb998f85628b3ee83fe028f4e7d32.zip |
dev-lang/ispc: Add GPU support
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang/ispc')
-rw-r--r-- | dev-lang/ispc/ispc-1.22.0-r1.ebuild | 12 | ||||
-rw-r--r-- | dev-lang/ispc/metadata.xml | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/dev-lang/ispc/ispc-1.22.0-r1.ebuild b/dev-lang/ispc/ispc-1.22.0-r1.ebuild index 7b18a7303e8a..d05fa1f7195e 100644 --- a/dev-lang/ispc/ispc-1.22.0-r1.ebuild +++ b/dev-lang/ispc/ispc-1.22.0-r1.ebuild @@ -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 diff --git a/dev-lang/ispc/metadata.xml b/dev-lang/ispc/metadata.xml index eb96ff15c20a..1ac64e1abb82 100644 --- a/dev-lang/ispc/metadata.xml +++ b/dev-lang/ispc/metadata.xml @@ -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> |