Skip to content

Commit

Permalink
Merge pull request #2707 from WardF/remove_fortran_bootstrap.wif
Browse files Browse the repository at this point in the history
Remove fortran bootstrap option
  • Loading branch information
WardF authored Jun 26, 2023
2 parents 6b430c9 + 48d5882 commit 9137873
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 204 deletions.
24 changes: 0 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -442,30 +442,6 @@ OPTION(ENABLE_MMAP "Use MMAP." ON)
# Option to use examples.
OPTION(ENABLE_EXAMPLES "Build Examples" ON)

# Option to automatically build netcdf-fortran.
IF(NOT MSVC)
OPTION(ENABLE_REMOTE_FORTRAN_BOOTSTRAP "Download and build netcdf-fortran automatically (EXPERIMENTAL)." OFF)
IF(ENABLE_REMOTE_FORTRAN_BOOTSTRAP)
SET(BUILD_FORTRAN ON)
ENDIF()
IF(BUILD_FORTRAN)
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/postinstall.sh.in"
"${CMAKE_BINARY_DIR}/postinstall.sh"
@ONLY)

ADD_CUSTOM_TARGET(build-netcdf-fortran
COMMAND sh -c "${CMAKE_BINARY_DIR}/postinstall.sh -t cmake -a build"
DEPENDS netcdf
)

ADD_CUSTOM_TARGET(install-netcdf-fortran
COMMAND sh -c "${CMAKE_BINARY_DIR}/postinstall.sh -t cmake -a install"
DEPENDS build-netcdf-fortran
)

ENDIF(BUILD_FORTRAN)
ENDIF()

###
# Allow the user to specify libraries
# to link against, similar to automakes 'LIBS' variable.
Expand Down
26 changes: 0 additions & 26 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -168,32 +168,6 @@ mm4::
b=`basename $$m` ; d=`dirname $$m`;\
pushd $$d; m4 -s $${b}.m4 > $${b}.c ; popd; done

#####
# If ENABLE_FORTRAN was turned on,
# we have new make targets, build-netcdf-fortran and
# install-netcdf-fortran.
#####

###
# build-netcdf-fortran
###
if BUILD_FORTRAN

build-netcdf-fortran:
echo "Downloading and Building NetCDF-Fortran"
chmod u+x $(abs_top_builddir)/postinstall.sh
sh -c "$(abs_top_builddir)/postinstall.sh -t autotools -a build"

###
# install-netcdf-fortran
###
install-netcdf-fortran:
echo "Installing NetCDF-Fortran"
chmod u+x $(abs_top_builddir)/postinstall.sh
sh -c "$(abs_top_builddir)/postinstall.sh -t autotools -a install"

endif

check_nc_config:
$(CC) `./nc-config --cflags` test_prog.c -o test_prog `./nc-config --libs`
./test_prog
Expand Down
3 changes: 0 additions & 3 deletions config.h.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ are set when opening a binary file on Windows. */
/* Define if building universal (internal helper macro) */
#cmakedefine AC_APPLE_UNIVERSAL_BUILD 1

/* If true, will attempt to download and build netcdf-fortran. */
#cmakedefine BUILD_FORTRAN 1

/* default file chunk cache nelems. */
#cmakedefine CHUNK_CACHE_NELEMS ${CHUNK_CACHE_NELEMS}

Expand Down
15 changes: 0 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,6 @@ if test "x$enable_hdf4_file_tests" = xyes; then
fi
AC_MSG_RESULT($enable_hdf4_file_tests)

# Does the user want to try to install netcdf-fortran
# automatically?
AC_MSG_CHECKING([whether we should attempt to install netcdf-fortran (EXPERIMENTAL)])
AC_ARG_ENABLE([remote-fortran-bootstrap], [AS_HELP_STRING([--enable-remote-fortran-bootstrap],
[Download and install netcdf-fortran (EXPERIMENTAL)])])
test "x$enable_remote_fortran_bootstrap" = xyes || enable_remote_fortran_bootstrap=no
AC_MSG_RESULT([$enable_remote_fortran_bootstrap])

# Does the user want to run extra parallel tests when parallel netCDF-4 is built?
AC_MSG_CHECKING([whether parallel IO tests should be run])
AC_ARG_ENABLE([parallel-tests],
Expand Down Expand Up @@ -1764,11 +1756,6 @@ if test "x$enable_erange_fill" = xyes ; then
fi
AC_SUBST(M4FLAGS)

# Check for downloading/building fortran via postinstall script.
if test "x$enable_remote_fortran_bootstrap" = xyes; then
AC_DEFINE([BUILD_FORTRAN], 1, [If true, will attempt to download and build netcdf-fortran.])
fi

# No logging for netcdf-3.
if test "x$enable_netcdf_4" = xno; then
enable_logging=no
Expand Down Expand Up @@ -1849,7 +1836,6 @@ AM_CONDITIONAL(USE_HDF5, [test x$enable_hdf5 = xyes])
AM_CONDITIONAL(USE_HDF4, [test x$enable_hdf4 = xyes])
AM_CONDITIONAL(USE_HDF4_FILE_TESTS, [test x$enable_hdf4_file_tests = xyes])
AM_CONDITIONAL(USE_RENAMEV3, [test x$enable_netcdf_4 = xyes -o x$enable_dap = xyes])
AM_CONDITIONAL(BUILD_FORTRAN, [test x$enable_remote_fortran_bootstrap = xyes])
AM_CONDITIONAL(USE_PNETCDF, [test x$enable_pnetcdf = xyes])
AM_CONDITIONAL(USE_DISPATCH, [test x$enable_dispatch = xyes])
AM_CONDITIONAL(BUILD_MMAP, [test x$enable_mmap = xyes])
Expand Down Expand Up @@ -2174,7 +2160,6 @@ AC_CONFIG_FILES([nc-config], [chmod 755 nc-config])
AC_CONFIG_FILES([Makefile
netcdf.pc
libnetcdf.settings
postinstall.sh
include/netcdf_meta.h
include/netcdf_dispatch.h
include/Makefile
Expand Down
136 changes: 0 additions & 136 deletions postinstall.sh.in

This file was deleted.

0 comments on commit 9137873

Please sign in to comment.