From 8a115df1c01a9d05cfa4e487bd9922967befef74 Mon Sep 17 00:00:00 2001 From: "J. Scott Berg" Date: Tue, 19 Sep 2023 14:20:12 -0400 Subject: [PATCH] Only attempt to build subdirectories that are present Allows to link against system libraries instead --- util/Distribution_User_Utility_Wrapper | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/Distribution_User_Utility_Wrapper b/util/Distribution_User_Utility_Wrapper index a885024182..b416630a83 100755 --- a/util/Distribution_User_Utility_Wrapper +++ b/util/Distribution_User_Utility_Wrapper @@ -26,8 +26,11 @@ if ( [[ "${CONDA_BUILD}" ]] ) ; then [ "${ACC_PLOT_PACKAGE}" == "plplot" ] && DIRLIST=( plplot ${DIRLIST[*]} ) else # List of Project Directories - Order here matters! - DIRLIST=( ${ACC_PLOT_PACKAGE_DIR} hdf5 fftw lapack lapack95 gsl fgsl forest xraylib sim_utils bmad tao cpp_bmad_interface code_examples bsim util_programs lux regression_tests ) - + DIRLIST=(${ACC_PLOT_PACKAGE_DIR}) + for d in hdf5 fftw lapack lapack95 gsl fgsl forest xraylib sim_utils bmad tao cpp_bmad_interface code_examples bsim util_programs lux regression_tests + do + [ -d "$DIST_BASE_DIR/$d" ] && DIRLIST=(${DIRLIST[*]} $d) + done # Build OpenMPI, if requested [ "${ACC_ENABLE_MPI}" == "Y" ] && DIRLIST=( openmpi ${DIRLIST[*]} ) fi