From: Michael Kruse Date: Sun, 20 Jun 2021 19:19:20 +0000 (-0500) Subject: Skip nvcc_ldir test with non-working nvcc (#867) X-Git-Tag: v4.4~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c8b03ebec22d9fa7e591496446d7eafbf26e8e1;p=thirdparty%2Fccache.git Skip nvcc_ldir test with non-working nvcc (#867) Add detection to nvcc_ldir of whether nvcc works with chosen host compiler. For instance, nvcc aborts with #error -- unsupported clang version! clang version must be less than 9 and greater than 3.2 if the version of clang (or gcc) is too new. The test should be skipped in this case. --- diff --git a/test/suites/nvcc_ldir.bash b/test/suites/nvcc_ldir.bash index a19432ad5..2090bed5f 100644 --- a/test/suites/nvcc_ldir.bash +++ b/test/suites/nvcc_ldir.bash @@ -22,6 +22,11 @@ SUITE_nvcc_ldir_PROBE() { elif [ ! -d $nvcc_idir ]; then echo "include directory $nvcc_idir not found" fi + + echo "int main() { return 0; }" | $REAL_NVCC -Wno-deprecated-gpu-targets -ccbin $REAL_COMPILER_BIN -c -x cu - + if [ $? -ne 0 ]; then + echo "nvcc of a canary failed; Is CUDA compatible with the host compiler ($REAL_COMPILER_BIN)?" + fi } SUITE_nvcc_ldir_SETUP() {