Skip to content

Commit 0281c22

Browse files
committed
configure: pass windows-path to nvcc whenever cygpath is available
It might be using cl.exe on Windows, which does not understand Unix-Paths. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
1 parent 590e9d4 commit 0281c22

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

configure

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,13 +1030,15 @@ test_nvcc(){
10301030
log test_nvcc "$@"
10311031
cat > $TMPCU
10321032
log_file $TMPCU
1033-
test_cmd $nvcc -ptx $NVCCFLAGS "$@" $NVCC_C $(nvcc_o $TMPO) $TMPCU
1033+
tmpcu_=$TMPCU
1034+
tmpo_=$TMPO
1035+
[ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_)
1036+
test_cmd $nvcc -ptx $NVCCFLAGS "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_
10341037
}
10351038

10361039
check_nvcc() {
10371040
log check_nvcc "$@"
1038-
disable cuda_nvcc
1039-
test_nvcc <<EOF && enable cuda_nvcc
1041+
test_nvcc <<EOF
10401042
extern "C" {
10411043
__global__ void hello(unsigned char *data) {}
10421044
}

0 commit comments

Comments
 (0)