@@ -275,7 +275,7 @@ function install_caffe2() {
275275 CMAKE_ARGS+=(" -DCUDA_ARCH_NAME='Maxwell'" )
276276 fi
277277
278- if [[ $( which ccache | wc -c) -ne 0 ]]; then
278+ if [[ -L ${CCACHE_WRAPPER_DIR} /nvcc && $( $( readlink ${CCACHE_WRAPPER_DIR} /nvcc ) --version | grep ccache | wc -c) -ne 0 ]]; then
279279 CMAKE_ARGS+=(" -DCUDA_NVCC_EXECUTABLE=${CCACHE_WRAPPER_DIR} /nvcc" )
280280 fi
281281
@@ -467,7 +467,7 @@ function install_halide() {
467467}
468468
469469if ! test -z $gflags || ! test -z $all ; then
470- if [[ $( find $CONDA_PREFIX -name libgflags.so) ]]; then
470+ if [[ ! -z " $CONDA_PREFIX " && $( find $CONDA_PREFIX -name libgflags.so) ]]; then
471471 echo " gflags found"
472472 else
473473 echo " no files found"
@@ -476,7 +476,7 @@ if ! test -z $gflags || ! test -z $all; then
476476fi
477477
478478if ! test -z $glog || ! test -z $all ; then
479- if [[ $( find $CONDA_PREFIX -name libglog.so) ]]; then
479+ if [[ ! -z " $CONDA_PREFIX " && $( find $CONDA_PREFIX -name libglog.so) ]]; then
480480 echo " glog found"
481481 else
482482 echo " no files found"
494494
495495if ! test -z $caffe2 || ! test -z $all ; then
496496 if [ " $WITH_CAFFE2 " == " ON" ]; then
497- if [[ $( find $CONDA_PREFIX -name libcaffe2_gpu.so) ]]; then
497+ if [[ ! -z " $CONDA_PREFIX " && $( find $CONDA_PREFIX -name libcaffe2_gpu.so) ]]; then
498498 echo " caffe2 found"
499499 else
500500 echo " no files found"
@@ -504,7 +504,7 @@ if ! test -z $caffe2 || ! test -z $all ; then
504504fi
505505
506506if ! test -z $isl || ! test -z $all ; then
507- if [[ $( find $CONDA_PREFIX -name libisl.so) ]]; then
507+ if [[ ! -z " $CONDA_PREFIX " && $( find $CONDA_PREFIX -name libisl.so) ]]; then
508508 echo " isl found"
509509 else
510510 echo " no files found"
@@ -517,7 +517,7 @@ if ! test -z $dlpack || ! test -z $all; then
517517fi
518518
519519if ! test -z $halide || ! test -z $all ; then
520- if [[ $( find $CONDA_PREFIX -name libHalide.so) ]]; then
520+ if [[ ! -z " $CONDA_PREFIX " && $( find $CONDA_PREFIX -name libHalide.so) ]]; then
521521 echo " Halide found"
522522 else
523523 echo " no files found"
0 commit comments