Loading scripts/compile_dep.sh +35 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,41 @@ determine_compiler() { fi } # Check whether the loaded profile defines a particular dependency name. # The function requires a valid bash regex argument to do the search. The # function is meant to be used in a conditional context. # # Examples: # 1. Check whether any flavor of 'libfabric' is defined by the profile: # # if profile_has_dependency "^libfabric%.*$"; then # echo "libfabric found" # fi # # 2. Check whether a specific flavor of 'libfabric' is defined by the profile: # # if profile_has_dependency "^libfabric%experimental$"; then # echo "libfabric.experimental found" # fi profile_has_dependency() { if [[ "$#" -ne 1 ]]; then >&2 echo "FATAL: Missing argument in profile_has_dependency()" exit 1 fi regex="$1" for name in "${PROFILE_DEP_LIST[@]}"; do if [[ "${name}" =~ ${regex} ]]; then return 0 fi done return 1 } POSITIONAL=() while [[ $# -gt 0 ]]; do Loading scripts/profiles/0.8.0/install/mercury.install +2 −4 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ pkg_install() { set -x # if the profile compiles bmi, enable it if [[ -n "${PROFILE_DEP_NAMES['bmi']}" ]]; then USE_BMI="-DNA_USE_BMI:BOOL=ON" Loading @@ -54,8 +52,8 @@ pkg_install() { USE_BMI="-DNA_USE_BMI:BOOL=OFF" fi # if the profile compiles libfabric, enable it if [[ -n "${PROFILE_DEP_NAMES['libfabric']}" ]]; then # if the profile provides any flavour of libfabric, enable it if profile_has_dependency "^libfabric.*$"; then USE_OFI="-DNA_USE_OFI:BOOL=ON" else USE_OFI="-DNA_USE_OFI:BOOL=OFF" Loading Loading
scripts/compile_dep.sh +35 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,41 @@ determine_compiler() { fi } # Check whether the loaded profile defines a particular dependency name. # The function requires a valid bash regex argument to do the search. The # function is meant to be used in a conditional context. # # Examples: # 1. Check whether any flavor of 'libfabric' is defined by the profile: # # if profile_has_dependency "^libfabric%.*$"; then # echo "libfabric found" # fi # # 2. Check whether a specific flavor of 'libfabric' is defined by the profile: # # if profile_has_dependency "^libfabric%experimental$"; then # echo "libfabric.experimental found" # fi profile_has_dependency() { if [[ "$#" -ne 1 ]]; then >&2 echo "FATAL: Missing argument in profile_has_dependency()" exit 1 fi regex="$1" for name in "${PROFILE_DEP_LIST[@]}"; do if [[ "${name}" =~ ${regex} ]]; then return 0 fi done return 1 } POSITIONAL=() while [[ $# -gt 0 ]]; do Loading
scripts/profiles/0.8.0/install/mercury.install +2 −4 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ pkg_install() { set -x # if the profile compiles bmi, enable it if [[ -n "${PROFILE_DEP_NAMES['bmi']}" ]]; then USE_BMI="-DNA_USE_BMI:BOOL=ON" Loading @@ -54,8 +52,8 @@ pkg_install() { USE_BMI="-DNA_USE_BMI:BOOL=OFF" fi # if the profile compiles libfabric, enable it if [[ -n "${PROFILE_DEP_NAMES['libfabric']}" ]]; then # if the profile provides any flavour of libfabric, enable it if profile_has_dependency "^libfabric.*$"; then USE_OFI="-DNA_USE_OFI:BOOL=ON" else USE_OFI="-DNA_USE_OFI:BOOL=OFF" Loading