fix for clang C compilers

This commit is contained in:
edoapra 2023-05-31 15:43:05 -07:00
parent c89fc9d1ec
commit a02eebcd89
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0

View file

@ -166,11 +166,6 @@ fi
#if [[ ! -z "$BUILD_SCALAPACK" ]] ; then
# Fortran_FLAGS+=-I"$NWCHEM_TOP"/src/libext/include
#fi
#fix for clang 12 error in implicit-function-declaration
GOTCLANG=$( "$MPICC" -dM -E - </dev/null 2> /dev/null |grep __clang__|head -1|cut -c19)
if [[ ${GOTCLANG} == "1" ]] ; then
C_FLAGS=" -Wno-error=implicit-function-declaration "
fi
echo "SCALAPACK_SIZE" is $SCALAPACK_SIZE
if [[ ${FC} == ftn ]]; then
if [[ ${PE_ENV} == PGI ]]; then
@ -213,6 +208,7 @@ if [[ -z "$I_MPI_CC" ]] ; then
export I_MPI_CC="$CC"
fi
echo I_MPI_F90 is "$I_MPI_F90"
echo I_MPI_CC is "$I_MPI_CC"
if [[ -z "$PE_ENV" ]] ; then
#check if mpif90 and FC are consistent
MPIF90_EXTRA=$(${NWCHEM_TOP}/src/config/strip_compiler.sh `${MPIF90} -show`)
@ -225,6 +221,11 @@ if [[ -z "$PE_ENV" ]] ; then
exit 1
fi
fi
#fix for clang 12 error in implicit-function-declaration
GOTCLANG=$( "$MPICC" -dM -E - </dev/null 2> /dev/null |grep __clang__|head -1|cut -c19)
if [[ ${GOTCLANG} == "1" ]] ; then
C_FLAGS=" -Wno-error=implicit-function-declaration "
fi
if [[ "$SCALAPACK_SIZE" == 8 ]] ; then
if [[ ${FC} == f95 ]] || [[ ${FC_EXTRA} == gfortran ]] ; then
Fortran_FLAGS+=" -fdefault-integer-8 -w "