Skip to content

Commit 2b0211a

Browse files
committed
Don't show developer warnings from install.sh
If you have OPENCOARRAYS_DEVELOPER set in your environment then -Wdev will be turned back on.
1 parent 3f7d785 commit 2b0211a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

prerequisites/install-functions/build_opencoarrays.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ build_opencoarrays()
1818
if [[ "${MPIFC_show[0]}" != *gfortran* || "${MPICC_show[0]}" != *gcc* ]]; then
1919
emergency "build_opencoarrays.sh: MPI doesn't wrap gfortran/gcc: \${MPIFC_show}=${MPIFC_show[*]}, \${MPICC_show}=${MPICC_show[*]}"
2020
fi
21-
# Set FC to the MPI implementation's gfortran command with any preceding path but without any subsequent arguments:
21+
if [[ -z "${OPENCOARRAYS_DEVELOPER:-}" ]]; then
22+
# We should examine the value too, but CMake has many ways of saying "true"
23+
WDEVFLAG=-Wno-dev
24+
else
25+
WDEVFLAG=-Wdev
26+
fi
27+
# Set FC to the MPI implementation's gfortran command with any preceding path but without any subsequent arguments:
2228
FC="${MPIFC_show[0]}"
2329
# Set CC to the MPI implementation's gcc command...
2430
CC="${MPICC_show[0]}"
@@ -31,8 +37,8 @@ build_opencoarrays()
3137
MPIEXEC="${MPIEXEC_CANDIDATES[0]}"
3238
fi
3339
info "Configuring OpenCoarrays in ${PWD} with the command:"
34-
info "CC=\"${CC}\" FC=\"${FC}\" $CMAKE \"${opencoarrays_src_dir}\" -DCMAKE_INSTALL_PREFIX=\"${install_path}\" -DMPIEXEC=\"${MPIEXEC}\" -DMPI_C_COMPILER=\"${MPICC}\" -DMPI_Fortran_COMPILER=\"${MPIFC}\""
35-
CC="${CC}" FC="${FC}" $CMAKE "${opencoarrays_src_dir}" -DCMAKE_INSTALL_PREFIX="${install_path}" -DMPIEXEC="${MPIEXEC}" -DMPI_C_COMPILER="${MPICC}" -DMPI_Fortran_COMPILER="${MPIFC}"
40+
info "CC=\"${CC}\" FC=\"${FC}\" $CMAKE \"${opencoarrays_src_dir}\" \"${WDEVFLAG}\" -DCMAKE_INSTALL_PREFIX=\"${install_path}\" -DMPIEXEC=\"${MPIEXEC}\" -DMPI_C_COMPILER=\"${MPICC}\" -DMPI_Fortran_COMPILER=\"${MPIFC}\""
41+
CC="${CC}" FC="${FC}" $CMAKE "${opencoarrays_src_dir}" "${WDEVFLAG}" -DCMAKE_INSTALL_PREFIX="${install_path}" -DMPIEXEC="${MPIEXEC}" -DMPI_C_COMPILER="${MPICC}" -DMPI_Fortran_COMPILER="${MPIFC}"
3642
info "Building OpenCoarrays in ${PWD} with the command make -j${num_threads}"
3743
make "-j${num_threads}"
3844
if [[ ! -z ${SUDO:-} ]]; then

0 commit comments

Comments
 (0)