Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit f89c4cf

Browse files
authored
Merge pull request #337 from facebookresearch/pr/build_sh_fixes
build.sh fixes
2 parents 68efb12 + 9bdfc8d commit f89c4cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

469469
if ! 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
476476
fi
477477

478478
if ! 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"
@@ -494,7 +494,7 @@ fi
494494

495495
if ! 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
504504
fi
505505

506506
if ! 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
517517
fi
518518

519519
if ! 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

Comments
 (0)