Skip to content

Commit

Permalink
fixing cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Aug 30, 2024
1 parent ab97475 commit f027bce
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
26 changes: 15 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -948,17 +948,6 @@ if(NETCDF_ENABLE_PARALLEL4 AND NETCDF_ENABLE_HDF5)
set(MPIEXEC "${NETCDF_MPIEXEC}")
endif()
message(STATUS "MPIEXEC command will be ${MPIEXEC}")
configure_file("${netCDF_SOURCE_DIR}/nc_test4/run_par_test.sh.in"
"${netCDF_BINARY_DIR}/tmp/run_par_test.sh" @ONLY NEWLINE_STYLE LF)
file(COPY "${netCDF_BINARY_DIR}/tmp/run_par_test.sh"
DESTINATION ${netCDF_BINARY_DIR}/nc_test4
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
configure_file("${netCDF_SOURCE_DIR}/h5_test/run_par_tests.sh.in"
"${netCDF_BINARY_DIR}/tmp/run_par_tests.sh" @ONLY NEWLINE_STYLE LF)
file(COPY "${netCDF_BINARY_DIR}/tmp/run_par_tests.sh"
DESTINATION ${netCDF_BINARY_DIR}/h5_test
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
set(IMPORT_MPI "include(CMakeFindDependencyMacro)\nfind_dependency(MPI COMPONENTS C)")
endif()
endif()

Expand Down Expand Up @@ -1758,6 +1747,21 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in"
"${CMAKE_CURRENT_BINARY_DIR}/libnetcdf.settings"
@ONLY)

if(NETCDF_ENABLE_PARALLEL4 AND NETCDF_ENABLE_HDF5)
if(HDF5_PARALLEL)
configure_file("${netCDF_SOURCE_DIR}/nc_test4/run_par_test.sh.in"
"${netCDF_BINARY_DIR}/tmp/run_par_test.sh" @ONLY NEWLINE_STYLE LF)
file(COPY "${netCDF_BINARY_DIR}/tmp/run_par_test.sh"
DESTINATION ${netCDF_BINARY_DIR}/nc_test4
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
configure_file("${netCDF_SOURCE_DIR}/h5_test/run_par_tests.sh.in"
"${netCDF_BINARY_DIR}/tmp/run_par_tests.sh" @ONLY NEWLINE_STYLE LF)
file(COPY "${netCDF_BINARY_DIR}/tmp/run_par_tests.sh"
DESTINATION ${netCDF_BINARY_DIR}/h5_test
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
endif()

# Read in settings file, print out.
# Avoid using system-specific calls so that this
# might also work on Windows.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ else
have_zstd=no
fi
AC_MSG_CHECKING([whether we are going to build with zstd])
AC_SUBST([HAVE_ZSTD], [$have_zstd])
AC_SUBST([HAS_ZSTD], [$have_zstd])
AC_MSG_RESULT([$have_zstd])

##
Expand Down
2 changes: 1 addition & 1 deletion nc_test4/run_par_test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -e
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh

if test "x@HAVE_ZSTD@" = "xyes" ; then
if test "x@HAS_ZSTD@" = "xyes" ; then
# Load the findplugins function
. ${builddir}/findplugin.sh
echo "findplugin.sh loaded"
Expand Down

0 comments on commit f027bce

Please sign in to comment.