cuda-compiler-check-native: add recipe

to install a helper script to be used with ccache
for handling its compiler checks with either nvcc
or an ordinary compiler.

Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
Matt Madison
2020-11-05 14:33:32 -08:00
committed by Matt Madison
parent 3ba3e549a3
commit 1c7d644a1b
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
DESCRIPTION = "CCACHE_COMPILERCHECK wrapper for CUDA"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://cuda-compiler-check.sh"
inherit native
S = "${WORKDIR}"
do_compile() {
:
}
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/cuda-compiler-check.sh ${D}${bindir}/cuda-compiler-check
}

View File

@@ -0,0 +1,8 @@
#!/bin/sh
compiler="$1"
shift
if [ $(basename "$compiler") = "nvcc" ]; then
"$compiler" --version
else
"$@"
fi