Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fortran bootstrap option #2707

Merged
merged 3 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -352,14 +352,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 @@ -1757,11 +1749,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 @@ -1842,7 +1829,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 @@ -2167,7 +2153,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.

2 changes: 1 addition & 1 deletion unit_test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TESTS += run_s3sdk.sh
endif
endif

EXTRA_DIST = CMakeLists.txt run_s3sdk.sh run_reclaim.sh
EXTRA_DIST = CMakeLists.txt run_s3sdk.sh run_reclaim_tests.sh
EXTRA_DIST += nctest_netcdf4_classic.nc reclaim_tests.cdl

CLEANFILES = reclaim_tests*.txt reclaim_tests.nc
Expand Down