Changeset 4925 for BOL


Ignore:
Timestamp:
Apr 29, 2024, 4:56:55 PM (3 weeks ago)
Author:
Laurent Fairhead
Message:

-fallow-argument-mismatch added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_netcdf4_hdf5.bash

    r4417 r4925  
    1717    $0 [ -prefix path ]       where (path) to install
    1818                              (default: $install_dir)
    19        [ -CC compiler ]       C compiler to use
     19       [ -
     20CC compiler ]       C compiler to use
    2021                              (default: $c_compiler)
    2122       [ -FC compiler ]       Fortran compiler to use
     
    4243# Install location for packages
    4344mkdir -p $install_dir/src
     45
     46allow_arg_mismatch=""
     47if [[ ${f_compiler} == "gfortran" ]] ; then
     48  if [ `gfortran -dumpversion | cut -d. -f1` -ge 10 ] ; then
     49    allow_arg_mismatch="-fallow-argument-mismatch"
     50  fi
     51  export FFLAGS=" -O2 -fPIC $allow_arg_mismatch"
     52  export FCFLAGS="-O2 -ffree-form -fPIC $allow_arg_mismatch"
     53  export CPPFLAGS="-I${install_dir}/include"
     54  export CFLAGS="-O2 -fPIC"
     55  export CXXFLAGS="-O2 -fPIC"
     56elif [[ ${f_compiler} == "ifort" ]] ; then
     57  export CPP="icc -E"
     58  export FFLAGS="-O2 -ip -fpic"
     59  export FCFLAGS="-O2 -ip -fpic"
     60  export CPPFLAGS="-I${install_dir}/include"
     61  export CFLAGS="-O2 -ip -fpic"
     62  export CXXFLAGS="-O2 -ip -fpic"
     63else
     64  echo "unknown compiler $f_compiler"
     65  echo "might as well stop here"
     66  exit
     67fi
    4468
    4569# CURL
Note: See TracChangeset for help on using the changeset viewer.