lowercase things

This commit is contained in:
Kyle Shores 2024-02-09 16:27:18 -06:00
parent 7248e18e1a
commit 0b78616ddb
3 changed files with 179 additions and 189 deletions

View File

@ -5,19 +5,24 @@
# #
# Ed Hartnett # Ed Hartnett
# The source files for the HDF5 dispatch layer.
set(libnchdf5_SOURCES nc4hdf.c nc4info.c hdf5file.c hdf5attr.c
hdf5dim.c hdf5grp.c hdf5type.c hdf5internal.c hdf5create.c hdf5open.c
hdf5var.c nc4mem.c nc4memcb.c hdf5dispatch.c hdf5filter.c
hdf5set_format_compatibility.c hdf5debug.c)
if(ENABLE_BYTERANGE)
set(libnchdf5_SOURCES ${libnchdf5_SOURCES} H5FDhttp.c)
endif()
# Build the HDF5 dispatch layer as a library that will be included in # Build the HDF5 dispatch layer as a library that will be included in
# the netCDF library. # the netCDF library.
add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES}) add_library(netcdfhdf5 OBJECT)
# The source files for the HDF5 dispatch layer.
target_sources(netcdfhdf5 PRIVATE
nc4hdf.c nc4info.c hdf5file.c hdf5attr.c
hdf5dim.c hdf5grp.c hdf5type.c hdf5internal.c hdf5create.c hdf5open.c
hdf5var.c nc4mem.c nc4memcb.c hdf5dispatch.c hdf5filter.c
hdf5set_format_compatibility.c hdf5debug.c
)
if(ENABLE_BYTERANGE)
target_sources(netcdfhdf5 PRIVATE
H5FDhttp.c
)
endif()
if(STATUS_PARALLEL) if(STATUS_PARALLEL)
target_link_libraries(netcdfhdf5 PUBLIC MPI::MPI_C) target_link_libraries(netcdfhdf5 PUBLIC MPI::MPI_C)

View File

@ -221,30 +221,13 @@ if(ENABLE_SHARED_LIBRARY_VERSION)
) )
endif(ENABLE_SHARED_LIBRARY_VERSION) endif(ENABLE_SHARED_LIBRARY_VERSION)
### install(
# The INCLUDES directive was introduced in 2.8.12. TARGETS netcdf EXPORT netCDFTargets
# However, 2.8.11 is still the default on some LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
# popular linux distributions. See ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
# https://github.com/Unidata/netcdf-c/issues/135 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
# for more information. PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
### )
if(${CMAKE_VERSION} VERSION_LESS 2.8.12)
install(
TARGETS netcdf EXPORT netCDFTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
else()
install(
TARGETS netcdf EXPORT netCDFTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
endif()
set(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE) set(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE)
set(NC_LIBS ${NC_LIBS} PARENT_SCOPE) set(NC_LIBS ${NC_LIBS} PARENT_SCOPE)

View File

@ -9,20 +9,20 @@
# remove_definitions(-DDLL_NETCDF) # remove_definitions(-DDLL_NETCDF)
#ENDIF() #ENDIF()
SET(RCMERGE OFF) set(RCMERGE OFF)
IF(USE_X_GETOPT) if(USE_X_GETOPT)
SET(XGETOPTSRC "${CMAKE_CURRENT_SOURCE_DIR}/../libdispatch/XGetopt.c") set(XGETOPTSRC "${CMAKE_CURRENT_SOURCE_DIR}/../libdispatch/XGetopt.c")
ENDIF() endif()
SET(ncdump_FILES ncdump.c vardata.c dumplib.c indent.c nctime0.c utils.c nciter.c ${XGETOPTSRC}) set(ncdump_FILES ncdump.c vardata.c dumplib.c indent.c nctime0.c utils.c nciter.c ${XGETOPTSRC})
SET(nccopy_FILES nccopy.c nciter.c chunkspec.c utils.c dimmap.c list.c ${XGETOPTSRC}) set(nccopy_FILES nccopy.c nciter.c chunkspec.c utils.c dimmap.c list.c ${XGETOPTSRC})
SET(ocprint_FILES ocprint.c ${XGETOPTSRC}) set(ocprint_FILES ocprint.c ${XGETOPTSRC})
SET(ncvalidator_FILES ncvalidator.c ${XGETOPTSRC}) set(ncvalidator_FILES ncvalidator.c ${XGETOPTSRC})
SET(printfqn_FILES printfqn.c ${XGETOPTSRC}) set(printfqn_FILES printfqn.c ${XGETOPTSRC})
SET(ncpathcvt_FILES ncpathcvt.c ${XGETOPTSRC}) set(ncpathcvt_FILES ncpathcvt.c ${XGETOPTSRC})
SET(ncfilteravail_FILES ncfilteravail.c ${XGETOPTSRC}) set(ncfilteravail_FILES ncfilteravail.c ${XGETOPTSRC})
SET(nchdf5version_FILES nchdf5version.c) set(nchdf5version_FILES nchdf5version.c)
## ##
# Turn off inclusion of particular files when using the cmake-native # Turn off inclusion of particular files when using the cmake-native
@ -37,37 +37,37 @@ set_property(SOURCE dumplib.c
PROPERTY PROPERTY
SKIP_UNITY_BUILD_INCLUSION ON) SKIP_UNITY_BUILD_INCLUSION ON)
ADD_EXECUTABLE(ncdump ${ncdump_FILES}) add_executable(ncdump ${ncdump_FILES})
ADD_EXECUTABLE(nccopy ${nccopy_FILES}) add_executable(nccopy ${nccopy_FILES})
ADD_EXECUTABLE(ncvalidator ${ncvalidator_FILES}) add_executable(ncvalidator ${ncvalidator_FILES})
ADD_EXECUTABLE(ncpathcvt ${ncpathcvt_FILES}) add_executable(ncpathcvt ${ncpathcvt_FILES})
ADD_EXECUTABLE(ncfilteravail ${ncfilteravail_FILES}) add_executable(ncfilteravail ${ncfilteravail_FILES})
IF(USE_HDF5) if(USE_HDF5)
ADD_EXECUTABLE(nc4print nc4print.c nc4printer.c) add_executable(nc4print nc4print.c nc4printer.c)
ADD_EXECUTABLE(printfqn ${printfqn_FILES}) add_executable(printfqn ${printfqn_FILES})
ADD_EXECUTABLE(nchdf5version ${nchdf5version_FILES}) add_executable(nchdf5version ${nchdf5version_FILES})
ENDIF(USE_HDF5) endif(USE_HDF5)
IF(ENABLE_DAP) if(ENABLE_DAP)
ADD_EXECUTABLE(ocprint ${ocprint_FILES}) add_executable(ocprint ${ocprint_FILES})
ENDIF(ENABLE_DAP) endif(ENABLE_DAP)
TARGET_LINK_LIBRARIES(ncdump netcdf ${ALL_TLL_LIBS}) target_link_libraries(ncdump netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(nccopy netcdf ${ALL_TLL_LIBS}) target_link_libraries(nccopy netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(ncvalidator netcdf ${ALL_TLL_LIBS}) target_link_libraries(ncvalidator netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(ncpathcvt netcdf ${ALL_TLL_LIBS}) target_link_libraries(ncpathcvt netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(ncfilteravail netcdf ${ALL_TLL_LIBS}) target_link_libraries(ncfilteravail netcdf ${ALL_TLL_LIBS})
IF(USE_HDF5) if(USE_HDF5)
TARGET_LINK_LIBRARIES(nc4print netcdf ${ALL_TLL_LIBS}) target_link_libraries(nc4print netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(printfqn netcdf ${ALL_TLL_LIBS}) target_link_libraries(printfqn netcdf ${ALL_TLL_LIBS})
TARGET_LINK_LIBRARIES(nchdf5version netcdf ${ALL_TLL_LIBS}) target_link_libraries(nchdf5version netcdf ${ALL_TLL_LIBS})
ENDIF(USE_HDF5) endif(USE_HDF5)
IF(ENABLE_DAP) if(ENABLE_DAP)
TARGET_LINK_LIBRARIES(ocprint netcdf ${ALL_TLL_LIBS}) target_link_libraries(ocprint netcdf ${ALL_TLL_LIBS})
ENDIF(ENABLE_DAP) endif(ENABLE_DAP)
#### ####
# We have to do a little tweaking # We have to do a little tweaking
@ -76,14 +76,14 @@ ENDIF(ENABLE_DAP)
# test scripts to work. # test scripts to work.
#### ####
IF(MSVC) if(MSVC)
macro(setbinprops name) macro(setbinprops name)
SET_TARGET_PROPERTIES(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY set_target_properties(${name}
${CMAKE_CURRENT_BINARY_DIR}) PRORERTIES
SET_TARGET_PROPERTIES(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) )
endmacro() endmacro()
setbinprops(ncdump) setbinprops(ncdump)
@ -92,99 +92,101 @@ IF(MSVC)
setbinprops(ncpathcvt) setbinprops(ncpathcvt)
setbinprops(ncfilteravail) setbinprops(ncfilteravail)
IF(USE_HDF5) if(USE_HDF5)
setbinprops(printfqn) setbinprops(printfqn)
setbinprops(nchdf5version) setbinprops(nchdf5version)
ENDIF(USE_HDF5) endif(USE_HDF5)
IF(ENABLE_DAP) if(ENABLE_DAP)
setbinprops(ocprint) setbinprops(ocprint)
ENDIF(ENABLE_DAP) endif(ENABLE_DAP)
ENDIF()
IF(ENABLE_TESTS)
ADD_EXECUTABLE(rewrite-scalar rewrite-scalar.c)
ADD_EXECUTABLE(bom bom.c)
ADD_EXECUTABLE(tst_dimsizes tst_dimsizes.c)
ADD_EXECUTABLE(nctrunc nctrunc.c)
if(RCMERGE)
ADD_EXECUTABLE(tst_rcmerge tst_rcmerge.c)
ADD_EXECUTABLE(tst_rcmerge tst_rcapi.c)
endif() endif()
TARGET_LINK_LIBRARIES(rewrite-scalar netcdf)
TARGET_LINK_LIBRARIES(bom netcdf) if(ENABLE_TESTS)
TARGET_LINK_LIBRARIES(tst_dimsizes netcdf)
TARGET_LINK_LIBRARIES(nctrunc netcdf) add_executable(rewrite-scalar rewrite-scalar.c)
add_executable(bom bom.c)
add_executable(tst_dimsizes tst_dimsizes.c)
add_executable(nctrunc nctrunc.c)
if(RCMERGE) if(RCMERGE)
TARGET_LINK_LIBRARIES(tst_rcmerge netcdf) add_executable(tst_rcmerge tst_rcmerge.c)
TARGET_LINK_LIBRARIES(tst_rcapi netcdf) add_executable(tst_rcmerge tst_rcapi.c)
endif()
target_link_libraries(rewrite-scalar netcdf)
target_link_libraries(bom netcdf)
target_link_libraries(tst_dimsizes netcdf)
target_link_libraries(nctrunc netcdf)
if(RCMERGE)
target_link_libraries(tst_rcmerge netcdf)
target_link_libraries(tst_rcapi netcdf)
endif() endif()
IF(USE_HDF5) IF(USE_HDF5)
ADD_EXECUTABLE(tst_fileinfo tst_fileinfo.c) add_executable(tst_fileinfo tst_fileinfo.c)
TARGET_LINK_LIBRARIES(tst_fileinfo netcdf) target_link_libraries(tst_fileinfo netcdf)
ENDIF() ENDIF()
IF(MSVC) IF(MSVC)
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY set_target_properties(rewrite-scalar
${CMAKE_CURRENT_BINARY_DIR}) PROPERTIES
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) )
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY set_target_properties(bom
${CMAKE_CURRENT_BINARY_DIR}) PROPERTIES
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) )
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY set_target_properties(tst_dimsizes
${CMAKE_CURRENT_BINARY_DIR}) PROPERTIES
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) )
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY set_target_properties(nctrunc
${CMAKE_CURRENT_BINARY_DIR}) PROPERTIES
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) )
IF(RCMERGE) if(RCMERGE)
SET_TARGET_PROPERTIES(tst_rcmerge PROPERTIES RUNTIME_OUTPUT_DIRECTORY set_target_properties(tst_rcmerge
${CMAKE_CURRENT_BINARY_DIR}) PROPERTIES
SET_TARGET_PROPERTIES(tst_rcmerge PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(tst_rcmerge PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(tst_rcapi PROPERTIES RUNTIME_OUTPUT_DIRECTORY )
${CMAKE_CURRENT_BINARY_DIR})
SET_TARGET_PROPERTIES(tst_rcapi PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG set_target_properties(tst_rcapi
${CMAKE_CURRENT_BINARY_DIR}) PROPERTIES
SET_TARGET_PROPERTIES(tst_rcapi PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
)
endif() endif()
IF(USE_HDF5) if(USE_HDF5)
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY set_target_properties(tst_fileinfo
${CMAKE_CURRENT_BINARY_DIR}) PROPERTIES
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}) )
endif(USE_HDF5)
ENDIF(USE_HDF5) endif(MSVC)
ENDIF(MSVC)
# Build support programs # Build support programs
build_bin_test_no_prefix(tst_utf8) build_bin_test_no_prefix(tst_utf8)
build_bin_test_no_prefix(tst_fillbug) build_bin_test_no_prefix(tst_fillbug)
IF(USE_HDF5) if(USE_HDF5)
build_bin_test_no_prefix(tst_h_rdc0) build_bin_test_no_prefix(tst_h_rdc0)
build_bin_test_no_prefix(tst_unicode) build_bin_test_no_prefix(tst_unicode)
build_bin_test_no_prefix(tst_vlen_data) build_bin_test_no_prefix(tst_vlen_data)
@ -203,14 +205,14 @@ endif()
# Add this test by hand, as it is also called from a script. # Add this test by hand, as it is also called from a script.
# Editing the script would break autotools compatibility. # Editing the script would break autotools compatibility.
build_bin_test_no_prefix(tst_special_atts) build_bin_test_no_prefix(tst_special_atts)
ENDIF(USE_HDF5) endif(USE_HDF5)
# Base tests # Base tests
# The tests are set up as a combination of shell scripts and executables that # The tests are set up as a combination of shell scripts and executables that
# must be run in a particular order. It is painful but will use macros to help # must be run in a particular order. It is painful but will use macros to help
# keep it from being too bad. # keep it from being too bad.
IF(HAVE_BASH) if(HAVE_BASH)
## Start adding tests in the appropriate order ## Start adding tests in the appropriate order
add_bin_test_no_prefix(ref_ctest) add_bin_test_no_prefix(ref_ctest)
@ -235,11 +237,11 @@ endif()
add_sh_test(ncdump tst_ctests) add_sh_test(ncdump tst_ctests)
add_sh_test(ncdump tst_null_byte_padding) add_sh_test(ncdump tst_null_byte_padding)
IF(USE_STRICT_NULL_BYTE_HEADER_PADDING) if(USE_STRICT_NULL_BYTE_HEADER_PADDING)
SET_TESTS_PROPERTIES(ncdump_tst_null_byte_padding PROPERTIES WILL_FAIL TRUE) SET_TESTS_PROPERTIES(ncdump_tst_null_byte_padding PROPERTIES WILL_FAIL TRUE)
ENDIF(USE_STRICT_NULL_BYTE_HEADER_PADDING) endif(USE_STRICT_NULL_BYTE_HEADER_PADDING)
IF(NOT MSVC AND NOT MINGW) if(NOT MSVC AND NOT MINGW)
add_sh_test(ncdump tst_output) add_sh_test(ncdump tst_output)
add_sh_test(ncdump tst_nccopy3) add_sh_test(ncdump tst_nccopy3)
# Known failure on MSVC; the number of 0's padding # Known failure on MSVC; the number of 0's padding
@ -248,12 +250,12 @@ endif()
add_sh_test(ncdump tst_netcdf4) add_sh_test(ncdump tst_netcdf4)
endif() endif()
SET_TESTS_PROPERTIES(ncdump_tst_nccopy3 PROPERTIES DEPENDS set_tests_properties(ncdump_tst_nccopy3 PROPERTIES DEPENDS
"ncdump_tst_calendars;ncdump_run_utf8_tests;ncdump_tst_output;ncdump_tst_64bit;ncdump_run_tests;ncdump_tst_lengths") "ncdump_tst_calendars;ncdump_run_utf8_tests;ncdump_tst_output;ncdump_tst_64bit;ncdump_run_tests;ncdump_tst_lengths")
ENDIF() endif()
IF(USE_HDF5) if(USE_HDF5)
add_sh_test(ncdump tst_formatx4) add_sh_test(ncdump tst_formatx4)
add_sh_test(ncdump_sh tst_fillbug) add_sh_test(ncdump_sh tst_fillbug)
add_sh_test(ncdump_shell tst_h_scalar) add_sh_test(ncdump_shell tst_h_scalar)
@ -272,31 +274,31 @@ endif()
add_sh_test(ncdump tst_nccopy4) add_sh_test(ncdump tst_nccopy4)
add_sh_test(ncdump tst_calendars_nc4) add_sh_test(ncdump tst_calendars_nc4)
SET_TESTS_PROPERTIES(ncdump_tst_nccopy4 PROPERTIES DEPENDS "ncdump_run_ncgen_tests;ncdump_tst_output;ncdump_tst_ncgen4;ncdump_sh_tst_fillbug;ncdump_tst_netcdf4_4;ncdump_tst_h_scalar;tst_comp;tst_comp2;tst_nans;tst_opaque_data;tst_create_files;tst_special_atts") set_tests_properties(ncdump_tst_nccopy4 PROPERTIES DEPENDS "ncdump_run_ncgen_tests;ncdump_tst_output;ncdump_tst_ncgen4;ncdump_sh_tst_fillbug;ncdump_tst_netcdf4_4;ncdump_tst_h_scalar;tst_comp;tst_comp2;tst_nans;tst_opaque_data;tst_create_files;tst_special_atts")
SET_TESTS_PROPERTIES(ncdump_tst_nccopy5 PROPERTIES DEPENDS "ncdump_tst_nccopy4") set_tests_properties(ncdump_tst_nccopy5 PROPERTIES DEPENDS "ncdump_tst_nccopy4")
ENDIF(USE_HDF5) endif(USE_HDF5)
# The following test script invokes # The following test script invokes
# gcc directly. # gcc directly.
IF(CMAKE_COMPILER_IS_GNUCC OR APPLE) if(CMAKE_COMPILER_IS_GNUCC OR APPLE)
IF(ENABLE_LARGE_FILE_TESTS) if(ENABLE_LARGE_FILE_TESTS)
add_sh_test(ncdump tst_iter) add_sh_test(ncdump tst_iter)
ENDIF(ENABLE_LARGE_FILE_TESTS) endif(ENABLE_LARGE_FILE_TESTS)
ENDIF(CMAKE_COMPILER_IS_GNUCC OR APPLE) endif(CMAKE_COMPILER_IS_GNUCC OR APPLE)
### ###
# This test fails on Visual Studio builds with bash. # This test fails on Visual Studio builds with bash.
# It passes, but technically fails because the scientific # It passes, but technically fails because the scientific
# formatting omits a 0. # formatting omits a 0.
### ###
IF(EXTRA_TESTS) if(EXTRA_TESTS)
IF(USE_HDF5) if(USE_HDF5)
IF(NOT MSVC AND NOT MINGW) if(NOT MSVC AND NOT MINGW)
add_sh_test(ncdump run_back_comp_tests) add_sh_test(ncdump run_back_comp_tests)
ENDIF() endif()
ENDIF() endif()
ENDIF(EXTRA_TESTS) endif(EXTRA_TESTS)
# The unicode tests # The unicode tests
if(NOT ISMINGW) if(NOT ISMINGW)
@ -304,11 +306,11 @@ endif()
add_sh_test(ncdump test_unicode_path) add_sh_test(ncdump test_unicode_path)
ENDIF() ENDIF()
IF(USE_CDF5) if(USE_CDF5)
add_sh_test(ncdump test_keywords) add_sh_test(ncdump test_keywords)
ENDIF() ENDIF()
IF(USE_HDF5) if(USE_HDF5)
add_sh_test(ncdump test_scope) add_sh_test(ncdump test_scope)
ENDIF() ENDIF()
@ -316,43 +318,43 @@ endif()
add_sh_test(ncdump test_rcmerge) add_sh_test(ncdump test_rcmerge)
endif() endif()
ENDIF(HAVE_BASH) endif(HAVE_BASH)
ENDIF(ENABLE_TESTS) endif(ENABLE_TESTS)
#IF(MSVC) #IF(MSVC)
# SET_TARGET_PROPERTIES(ncdump # set_target_properties(ncdump
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT" # PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
# ) # )
# SET_TARGET_PROPERTIES(nccopy # set_target_properties(nccopy
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT" # PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
# ) # )
# SET_TARGET_PROPERTIES(ncvalidator # set_target_properties(ncvalidator
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT" # PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
# ) # )
# IF(ENABLE_DAP) # IF(ENABLE_DAP)
# SET_TARGET_PROPERTIES(ocprint # set_target_properties(ocprint
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT" # PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
# ) # )
# ENDIF(ENABLE_DAP) # ENDIF(ENABLE_DAP)
#ENDIF() #ENDIF()
INSTALL(TARGETS ncdump RUNTIME DESTINATION bin COMPONENT utilities) install(TARGETS ncdump RUNTIME DESTINATION bin COMPONENT utilities)
INSTALL(TARGETS nccopy RUNTIME DESTINATION bin COMPONENT utilities) install(TARGETS nccopy RUNTIME DESTINATION bin COMPONENT utilities)
SET(MAN_FILES nccopy.1 ncdump.1) set(MAN_FILES nccopy.1 ncdump.1)
# Note, the L512.bin file is file containing exactly 512 bytes each of value 0. # Note, the L512.bin file is file containing exactly 512 bytes each of value 0.
# It is used for creating hdf5 files with varying offsets for testing. # It is used for creating hdf5 files with varying offsets for testing.
FILE(GLOB COPY_FILES ${CMAKE_BINARY_DIR}/ncgen/*.nc ${CMAKE_BINARY_DIR}/nc_test4/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.ncml ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.1 ${CMAKE_CURRENT_SOURCE_DIR}/L512.bin ${CMAKE_CURRENT_SOURCE_DIR}/ref_ctest*.c ) file(GLOB COPY_FILES ${CMAKE_BINARY_DIR}/ncgen/*.nc ${CMAKE_BINARY_DIR}/nc_test4/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.ncml ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.1 ${CMAKE_CURRENT_SOURCE_DIR}/L512.bin ${CMAKE_CURRENT_SOURCE_DIR}/ref_ctest*.c )
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE) file(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
ADD_SUBDIRECTORY(cdl) add_subdirectory(cdl)
ADD_SUBDIRECTORY(expected) add_subdirectory(expected)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}") set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")
IF(NOT MSVC) if(NOT MSVC)
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1" COMPONENT documentation) install(FILES ${MAN_FILES} DESTINATION "share/man/man1" COMPONENT documentation)
ENDIF() endif()