diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-05-06 18:41:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 18:41:58 (GMT) |
commit | 5b40763b2be26d9a6e7855bbc1528fd8e523a071 (patch) | |
tree | 5ddf9abef10a6a37ead9b9ec5b8d9aee8eb4e3ff /config | |
parent | f360225b10fb84b6e51376e814c92f694e3f9627 (diff) | |
download | hdf5-5b40763b2be26d9a6e7855bbc1528fd8e523a071.zip hdf5-5b40763b2be26d9a6e7855bbc1528fd8e523a071.tar.gz hdf5-5b40763b2be26d9a6e7855bbc1528fd8e523a071.tar.bz2 |
Brings random stuff over from develop (#1738)
Diffstat (limited to 'config')
-rw-r--r-- | config/BlankForm | 90 | ||||
-rw-r--r-- | config/apple | 127 | ||||
-rw-r--r-- | config/cmake_ext_mod/NSIS.template.in | 4 | ||||
-rw-r--r-- | config/solaris | 6 |
4 files changed, 120 insertions, 107 deletions
diff --git a/config/BlankForm b/config/BlankForm index ce4bf53..68da38d 100644 --- a/config/BlankForm +++ b/config/BlankForm @@ -1,4 +1,4 @@ -# -*- shell-script -*- +# -*- shell-script -*- # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. @@ -52,39 +52,39 @@ fi # Flags that end with `_CPPFLAGS' are passed to the compiler when # compiling but not when linking. # -# DEBUG_CFLAGS Flags to pass to the compiler to create a -# DEBUG_CPPFLAGS library suitable for use with debugging -# tools. Usually this list will exclude -# optimization switches (like `-O') and include -# switches that turn on symbolic debugging -# support (like `-g'). +# DEBUG_CFLAGS Flags to pass to the compiler to create a +# DEBUG_CPPFLAGS library suitable for use with debugging +# tools. Usually this list will exclude +# optimization switches (like `-O') and include +# switches that turn on symbolic debugging +# support (like `-g'). # -# PROD_CFLAGS Flags to pass to the compiler to create a -# PROD_CPPFLAGS production version of the library. These -# usualy exclude symbolic debugging switches -# (like `-g') and include optimization switches -# (like `-O'). +# PROD_CFLAGS Flags to pass to the compiler to create a +# PROD_CPPFLAGS production version of the library. These +# usually exclude symbolic debugging switches +# (like `-g') and include optimization switches +# (like `-O'). # -# PROFILE_CFLAGS Flags to pass to the compiler to create a -# PROFILE_CPPFLAGS library suitable for performance testing (like -# `-pg'). This may or may not include debugging -# or production flags. -# -# H5_CFLAGS Flags can be added to this variable which -# might already be partially initialized. These -# flags will always be passed to the compiler -# and should include switches to turn on full -# warnings. HDF5 attempts to be ANSI and Posix -# compliant and employ good programming -# practices resulting in few if any -# warnings. +# PROFILE_CFLAGS Flags to pass to the compiler to create a +# PROFILE_CPPFLAGS library suitable for performance testing (like +# `-pg'). This may or may not include debugging +# or production flags. # -# Warning flags do not have to be added to H5_CFLAGS -# variable if the compiler is the GNU gcc -# compiler or a descendent of gcc such as EGCS or PGCC. +# H5_CFLAGS Flags can be added to this variable which +# might already be partially initialized. These +# flags will always be passed to the compiler +# and should include switches to turn on full +# warnings. HDF5 attempts to be ANSI and Posix +# compliant and employ good programming +# practices resulting in few if any +# warnings. +# +# Warning flags do not have to be added to H5_CFLAGS +# variable if the compiler is the GNU gcc +# compiler or a descendent of gcc such as EGCS or PGCC. # # AM_CFLAGS Flags added directly into this variable will -# be propogated to the compiler wrapper scripts (h5cc, +# be propagated to the compiler wrapper scripts (h5cc, # h5c++, et cetera) in addition to being used to compile # the library. # @@ -97,24 +97,24 @@ fi case $CC_BASENAME in gcc) - H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; *) - H5_CFLAGS="$H5_CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + H5_CFLAGS="$H5_CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/apple b/config/apple index 98dede2..0fb7dca 100644 --- a/config/apple +++ b/config/apple @@ -22,58 +22,60 @@ # No support for OS older than darwin 10.X. if test "X-" = "X-$CC"; then case "$host_os" in - darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available. - CC=gcc - CC_BASENAME=gcc - ;; - *) - CC=clang - CC_BASENAME=clang - - # Production - PROD_CFLAGS="-O3" - PROD_CPPFLAGS= - - # Debug - DEBUG_CFLAGS="-g -O0" - DEBUG_CPPFLAGS= - - # Profile - # Use this for profiling with gprof - # Just "-g" for now. More later. - PROFILE_CFLAGS="-g" - PROFILE_CPPFLAGS= - ;; + darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available. + CC=gcc + CC_BASENAME=gcc + ;; + *) + if test "X-$enable_parallel" = "X-yes"; then + # default to use mpicc which is the defacto MPI compiler name + CC=mpicc + CC_BASENAME=mpicc + else + CC=clang + CC_BASENAME=clang + fi + + # Production + PROD_CFLAGS="-O3" + PROD_CPPFLAGS= + + # Debug + DEBUG_CFLAGS="-g -O0" + DEBUG_CPPFLAGS= + + # Profile + # Use this for profiling with gprof + # Just "-g" for now. More later. + PROFILE_CFLAGS="-g" + PROFILE_CPPFLAGS= + ;; esac fi -# Figure out compiler flags +# Figure out C compiler flags . $srcdir/config/gnu-flags . $srcdir/config/clang-flags +. $srcdir/config/intel-flags + # temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not # use -O option as it causes failures in test/dt_arith. case "$host_os" in darwin1[12].*) # lion & mountain lion - #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version - case "$cc_vendor-$cc_version" in - gcc-4.2.1) - # Remove any -O flags - #echo PROD_CFLAGS=$PROD_CFLAGS - PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`" - #echo new PROD_CFLAGS=$PROD_CFLAGS - ;; - esac - ;; + #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version + case "$cc_vendor-$cc_version" in + gcc-4.2.1) + # Remove any -O flags + #echo PROD_CFLAGS=$PROD_CFLAGS + PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`" + #echo new PROD_CFLAGS=$PROD_CFLAGS + ;; + esac + ;; esac - -. $srcdir/config/intel-flags + if test "X-" = "X-$FC"; then case $CC_BASENAME in - clang) - # clang has no fortran compiler. Use gfortran. - FC=gfortran - FC_BASENAME=gfortran - ;; gcc*) FC=gfortran FC_BASENAME=gfortran @@ -82,15 +84,26 @@ if test "X-" = "X-$FC"; then FC=ifort FC_BASENAME=ifort ;; + mpicc*) + FC=mpif90 + FC_BASENAME=mpif90 + ;; + clang) + # clang has no fortran compiler. Use gfortran. + FC=gfortran + FC_BASENAME=gfortran + ;; esac fi +# Figure out FORTRAN compiler flags +. $srcdir/config/gnu-fflags +. $srcdir/config/intel-fflags + + +# The default C++ compiler is `clang++'. if test "X-" = "X-$CXX"; then case $CC_BASENAME in - clang) - CXX=clang++ - CXX_BASENAME=clang++ - ;; gcc) CXX=g++ CXX_BASENAME=g++ @@ -99,18 +112,21 @@ if test "X-" = "X-$CXX"; then CXX=icpc CXX_BASENAME=icpc ;; + mpicc*) + FC=mpif90 + FC_BASENAME=mpif90 + ;; + clang) + CXX=clang++ + CXX_BASENAME=clang++ + ;; esac fi -case $CXX_BASENAME in - clang++) - PROD_CXXFLAGS="-O3" - DEBUG_CXXFLAGS="-g -O0" - # Use this for profiling with gprof - # Just "-g" for now. More later. - PROFILE_CXXFLAGS="-g" - ;; -esac +# Figure out C++ compiler flags +. $srcdir/config/intel-cxxflags # Do this ahead of GNU to avoid icpc being detected as g++ +. $srcdir/config/gnu-cxxflags +. $srcdir/config/clang-cxxflags # compiler version strings case $CC in @@ -133,16 +149,15 @@ case $CC in echo "No match to get cc_version_info for $CC" ;; esac + # Figure out Fortran compiler flags and version strings case $FC in *gfortran*) - . $srcdir/config/gnu-fflags fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` ;; *ifc*|*ifort*) - . $srcdir/config/intel-fflags fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` ;; @@ -156,13 +171,11 @@ esac # get c++ version info case $CXX in clang++) - . $srcdir/config/clang-cxxflags cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'Apple' | sed 's/(.*//'` ;; *g++*) - . $srcdir/config/gnu-cxxflags cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` ;; diff --git a/config/cmake_ext_mod/NSIS.template.in b/config/cmake_ext_mod/NSIS.template.in index ecced05..db79466 100644 --- a/config/cmake_ext_mod/NSIS.template.in +++ b/config/cmake_ext_mod/NSIS.template.in @@ -849,7 +849,7 @@ Section "Uninstall" @CPACK_NSIS_DELETE_ICONS@ @CPACK_NSIS_DELETE_ICONS_EXTRA@ - ;Delete empty start menu parent diretories + ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" startMenuDeleteLoop: @@ -868,7 +868,7 @@ Section "Uninstall" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS_EXTRA@ - ;Delete empty start menu parent diretories + ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" secondStartMenuDeleteLoop: diff --git a/config/solaris b/config/solaris index b7c7963..6b6b74d 100644 --- a/config/solaris +++ b/config/solaris @@ -39,7 +39,7 @@ if test "X-" = "X-$cc_flags_set"; then # Debug # NDEBUG is handled explicitly by the configure script - # -g is hanled by the symbols flags + # -g is handled by the symbols flags DEBUG_CFLAGS= # Symbols @@ -101,7 +101,7 @@ if test "X-" = "X-$f9x_flags_set"; then # Debug # NDEBUG is handled explicitly by the configure script - # -g is hanled by the symbols flags + # -g is handled by the symbols flags DEBUG_FCFLAGS= # Symbols @@ -157,7 +157,7 @@ if test -z "$cxx_flags_set"; then # Debug # NDEBUG is handled explicitly by the configure script - # -g is hanled by the symbols flags + # -g is handled by the symbols flags DEBUG_CXXFLAGS= # Symbols |