configure: pass windows-path to nvcc whenever cygpath is available
authorTimo Rothenpieler <timo@rothenpieler.org>
Tue, 26 Feb 2019 16:09:26 +0000 (17:09 +0100)
committerTimo Rothenpieler <timo@rothenpieler.org>
Wed, 27 Feb 2019 17:03:17 +0000 (18:03 +0100)
It might be using cl.exe on Windows, which does not understand Unix-Paths.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
configure

index 6c6c1c4..1fbde5d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1030,7 +1030,10 @@ test_nvcc(){
     log test_nvcc "$@"
     cat > $TMPCU
     log_file $TMPCU
     log test_nvcc "$@"
     cat > $TMPCU
     log_file $TMPCU
-    test_cmd $nvcc -ptx $NVCCFLAGS "$@" $NVCC_C $(nvcc_o $TMPO) $TMPCU
+    tmpcu_=$TMPCU
+    tmpo_=$TMPO
+    [ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_)
+    test_cmd $nvcc -ptx $NVCCFLAGS "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_
 }
 
 check_nvcc() {
 }
 
 check_nvcc() {