mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-05 16:20:10 +08:00
lowercase things
This commit is contained in:
parent
7248e18e1a
commit
0b78616ddb
@ -5,19 +5,24 @@
|
||||
#
|
||||
# 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
|
||||
# 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)
|
||||
target_link_libraries(netcdfhdf5 PUBLIC MPI::MPI_C)
|
||||
|
@ -221,30 +221,13 @@ if(ENABLE_SHARED_LIBRARY_VERSION)
|
||||
)
|
||||
endif(ENABLE_SHARED_LIBRARY_VERSION)
|
||||
|
||||
###
|
||||
# The INCLUDES directive was introduced in 2.8.12.
|
||||
# However, 2.8.11 is still the default on some
|
||||
# popular linux distributions. See
|
||||
# https://github.com/Unidata/netcdf-c/issues/135
|
||||
# for more information.
|
||||
###
|
||||
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()
|
||||
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}
|
||||
)
|
||||
|
||||
set(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE)
|
||||
set(NC_LIBS ${NC_LIBS} PARENT_SCOPE)
|
||||
|
@ -9,20 +9,20 @@
|
||||
# remove_definitions(-DDLL_NETCDF)
|
||||
#ENDIF()
|
||||
|
||||
SET(RCMERGE OFF)
|
||||
set(RCMERGE OFF)
|
||||
|
||||
IF(USE_X_GETOPT)
|
||||
SET(XGETOPTSRC "${CMAKE_CURRENT_SOURCE_DIR}/../libdispatch/XGetopt.c")
|
||||
ENDIF()
|
||||
if(USE_X_GETOPT)
|
||||
set(XGETOPTSRC "${CMAKE_CURRENT_SOURCE_DIR}/../libdispatch/XGetopt.c")
|
||||
endif()
|
||||
|
||||
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(ocprint_FILES ocprint.c ${XGETOPTSRC})
|
||||
SET(ncvalidator_FILES ncvalidator.c ${XGETOPTSRC})
|
||||
SET(printfqn_FILES printfqn.c ${XGETOPTSRC})
|
||||
SET(ncpathcvt_FILES ncpathcvt.c ${XGETOPTSRC})
|
||||
SET(ncfilteravail_FILES ncfilteravail.c ${XGETOPTSRC})
|
||||
SET(nchdf5version_FILES nchdf5version.c)
|
||||
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(ocprint_FILES ocprint.c ${XGETOPTSRC})
|
||||
set(ncvalidator_FILES ncvalidator.c ${XGETOPTSRC})
|
||||
set(printfqn_FILES printfqn.c ${XGETOPTSRC})
|
||||
set(ncpathcvt_FILES ncpathcvt.c ${XGETOPTSRC})
|
||||
set(ncfilteravail_FILES ncfilteravail.c ${XGETOPTSRC})
|
||||
set(nchdf5version_FILES nchdf5version.c)
|
||||
|
||||
##
|
||||
# Turn off inclusion of particular files when using the cmake-native
|
||||
@ -37,37 +37,37 @@ set_property(SOURCE dumplib.c
|
||||
PROPERTY
|
||||
SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
ADD_EXECUTABLE(ncdump ${ncdump_FILES})
|
||||
ADD_EXECUTABLE(nccopy ${nccopy_FILES})
|
||||
ADD_EXECUTABLE(ncvalidator ${ncvalidator_FILES})
|
||||
ADD_EXECUTABLE(ncpathcvt ${ncpathcvt_FILES})
|
||||
ADD_EXECUTABLE(ncfilteravail ${ncfilteravail_FILES})
|
||||
add_executable(ncdump ${ncdump_FILES})
|
||||
add_executable(nccopy ${nccopy_FILES})
|
||||
add_executable(ncvalidator ${ncvalidator_FILES})
|
||||
add_executable(ncpathcvt ${ncpathcvt_FILES})
|
||||
add_executable(ncfilteravail ${ncfilteravail_FILES})
|
||||
|
||||
IF(USE_HDF5)
|
||||
ADD_EXECUTABLE(nc4print nc4print.c nc4printer.c)
|
||||
ADD_EXECUTABLE(printfqn ${printfqn_FILES})
|
||||
ADD_EXECUTABLE(nchdf5version ${nchdf5version_FILES})
|
||||
ENDIF(USE_HDF5)
|
||||
if(USE_HDF5)
|
||||
add_executable(nc4print nc4print.c nc4printer.c)
|
||||
add_executable(printfqn ${printfqn_FILES})
|
||||
add_executable(nchdf5version ${nchdf5version_FILES})
|
||||
endif(USE_HDF5)
|
||||
|
||||
IF(ENABLE_DAP)
|
||||
ADD_EXECUTABLE(ocprint ${ocprint_FILES})
|
||||
ENDIF(ENABLE_DAP)
|
||||
if(ENABLE_DAP)
|
||||
add_executable(ocprint ${ocprint_FILES})
|
||||
endif(ENABLE_DAP)
|
||||
|
||||
TARGET_LINK_LIBRARIES(ncdump netcdf ${ALL_TLL_LIBS})
|
||||
TARGET_LINK_LIBRARIES(nccopy netcdf ${ALL_TLL_LIBS})
|
||||
TARGET_LINK_LIBRARIES(ncvalidator netcdf ${ALL_TLL_LIBS})
|
||||
TARGET_LINK_LIBRARIES(ncpathcvt netcdf ${ALL_TLL_LIBS})
|
||||
TARGET_LINK_LIBRARIES(ncfilteravail netcdf ${ALL_TLL_LIBS})
|
||||
target_link_libraries(ncdump netcdf ${ALL_TLL_LIBS})
|
||||
target_link_libraries(nccopy netcdf ${ALL_TLL_LIBS})
|
||||
target_link_libraries(ncvalidator netcdf ${ALL_TLL_LIBS})
|
||||
target_link_libraries(ncpathcvt netcdf ${ALL_TLL_LIBS})
|
||||
target_link_libraries(ncfilteravail netcdf ${ALL_TLL_LIBS})
|
||||
|
||||
IF(USE_HDF5)
|
||||
TARGET_LINK_LIBRARIES(nc4print netcdf ${ALL_TLL_LIBS})
|
||||
TARGET_LINK_LIBRARIES(printfqn netcdf ${ALL_TLL_LIBS})
|
||||
TARGET_LINK_LIBRARIES(nchdf5version netcdf ${ALL_TLL_LIBS})
|
||||
ENDIF(USE_HDF5)
|
||||
if(USE_HDF5)
|
||||
target_link_libraries(nc4print netcdf ${ALL_TLL_LIBS})
|
||||
target_link_libraries(printfqn netcdf ${ALL_TLL_LIBS})
|
||||
target_link_libraries(nchdf5version netcdf ${ALL_TLL_LIBS})
|
||||
endif(USE_HDF5)
|
||||
|
||||
IF(ENABLE_DAP)
|
||||
TARGET_LINK_LIBRARIES(ocprint netcdf ${ALL_TLL_LIBS})
|
||||
ENDIF(ENABLE_DAP)
|
||||
if(ENABLE_DAP)
|
||||
target_link_libraries(ocprint netcdf ${ALL_TLL_LIBS})
|
||||
endif(ENABLE_DAP)
|
||||
|
||||
####
|
||||
# We have to do a little tweaking
|
||||
@ -76,14 +76,14 @@ ENDIF(ENABLE_DAP)
|
||||
# test scripts to work.
|
||||
####
|
||||
|
||||
IF(MSVC)
|
||||
if(MSVC)
|
||||
macro(setbinprops name)
|
||||
SET_TARGET_PROPERTIES(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${name}
|
||||
PRORERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
setbinprops(ncdump)
|
||||
@ -92,99 +92,101 @@ IF(MSVC)
|
||||
setbinprops(ncpathcvt)
|
||||
setbinprops(ncfilteravail)
|
||||
|
||||
IF(USE_HDF5)
|
||||
if(USE_HDF5)
|
||||
setbinprops(printfqn)
|
||||
setbinprops(nchdf5version)
|
||||
ENDIF(USE_HDF5)
|
||||
endif(USE_HDF5)
|
||||
|
||||
IF(ENABLE_DAP)
|
||||
if(ENABLE_DAP)
|
||||
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()
|
||||
TARGET_LINK_LIBRARIES(rewrite-scalar netcdf)
|
||||
TARGET_LINK_LIBRARIES(bom netcdf)
|
||||
TARGET_LINK_LIBRARIES(tst_dimsizes netcdf)
|
||||
TARGET_LINK_LIBRARIES(nctrunc netcdf)
|
||||
|
||||
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)
|
||||
TARGET_LINK_LIBRARIES(tst_rcmerge netcdf)
|
||||
TARGET_LINK_LIBRARIES(tst_rcapi netcdf)
|
||||
add_executable(tst_rcmerge tst_rcmerge.c)
|
||||
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()
|
||||
|
||||
IF(USE_HDF5)
|
||||
ADD_EXECUTABLE(tst_fileinfo tst_fileinfo.c)
|
||||
TARGET_LINK_LIBRARIES(tst_fileinfo netcdf)
|
||||
add_executable(tst_fileinfo tst_fileinfo.c)
|
||||
target_link_libraries(tst_fileinfo netcdf)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(rewrite-scalar
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(bom
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(tst_dimsizes
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(nctrunc PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(nctrunc
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
IF(RCMERGE)
|
||||
SET_TARGET_PROPERTIES(tst_rcmerge PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_rcmerge PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_rcmerge PROPERTIES 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
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_rcapi PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
if(RCMERGE)
|
||||
set_target_properties(tst_rcmerge
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${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}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(USE_HDF5)
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_fileinfo PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
ENDIF(USE_HDF5)
|
||||
ENDIF(MSVC)
|
||||
if(USE_HDF5)
|
||||
set_target_properties(tst_fileinfo
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif(USE_HDF5)
|
||||
endif(MSVC)
|
||||
|
||||
# Build support programs
|
||||
build_bin_test_no_prefix(tst_utf8)
|
||||
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_unicode)
|
||||
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.
|
||||
# Editing the script would break autotools compatibility.
|
||||
build_bin_test_no_prefix(tst_special_atts)
|
||||
ENDIF(USE_HDF5)
|
||||
endif(USE_HDF5)
|
||||
|
||||
# Base tests
|
||||
# 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
|
||||
# keep it from being too bad.
|
||||
|
||||
IF(HAVE_BASH)
|
||||
if(HAVE_BASH)
|
||||
|
||||
## Start adding tests in the appropriate order
|
||||
add_bin_test_no_prefix(ref_ctest)
|
||||
@ -235,11 +237,11 @@ endif()
|
||||
add_sh_test(ncdump tst_ctests)
|
||||
|
||||
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)
|
||||
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_nccopy3)
|
||||
# Known failure on MSVC; the number of 0's padding
|
||||
@ -248,12 +250,12 @@ endif()
|
||||
add_sh_test(ncdump tst_netcdf4)
|
||||
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")
|
||||
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
IF(USE_HDF5)
|
||||
if(USE_HDF5)
|
||||
add_sh_test(ncdump tst_formatx4)
|
||||
add_sh_test(ncdump_sh tst_fillbug)
|
||||
add_sh_test(ncdump_shell tst_h_scalar)
|
||||
@ -272,31 +274,31 @@ endif()
|
||||
add_sh_test(ncdump tst_nccopy4)
|
||||
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_nccopy5 PROPERTIES DEPENDS "ncdump_tst_nccopy4")
|
||||
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")
|
||||
|
||||
ENDIF(USE_HDF5)
|
||||
endif(USE_HDF5)
|
||||
|
||||
# The following test script invokes
|
||||
# gcc directly.
|
||||
IF(CMAKE_COMPILER_IS_GNUCC OR APPLE)
|
||||
IF(ENABLE_LARGE_FILE_TESTS)
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR APPLE)
|
||||
if(ENABLE_LARGE_FILE_TESTS)
|
||||
add_sh_test(ncdump tst_iter)
|
||||
ENDIF(ENABLE_LARGE_FILE_TESTS)
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC OR APPLE)
|
||||
endif(ENABLE_LARGE_FILE_TESTS)
|
||||
endif(CMAKE_COMPILER_IS_GNUCC OR APPLE)
|
||||
|
||||
###
|
||||
# This test fails on Visual Studio builds with bash.
|
||||
# It passes, but technically fails because the scientific
|
||||
# formatting omits a 0.
|
||||
###
|
||||
IF(EXTRA_TESTS)
|
||||
IF(USE_HDF5)
|
||||
IF(NOT MSVC AND NOT MINGW)
|
||||
if(EXTRA_TESTS)
|
||||
if(USE_HDF5)
|
||||
if(NOT MSVC AND NOT MINGW)
|
||||
add_sh_test(ncdump run_back_comp_tests)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF(EXTRA_TESTS)
|
||||
endif()
|
||||
endif()
|
||||
endif(EXTRA_TESTS)
|
||||
|
||||
# The unicode tests
|
||||
if(NOT ISMINGW)
|
||||
@ -304,11 +306,11 @@ endif()
|
||||
add_sh_test(ncdump test_unicode_path)
|
||||
ENDIF()
|
||||
|
||||
IF(USE_CDF5)
|
||||
if(USE_CDF5)
|
||||
add_sh_test(ncdump test_keywords)
|
||||
ENDIF()
|
||||
|
||||
IF(USE_HDF5)
|
||||
if(USE_HDF5)
|
||||
add_sh_test(ncdump test_scope)
|
||||
ENDIF()
|
||||
|
||||
@ -316,43 +318,43 @@ endif()
|
||||
add_sh_test(ncdump test_rcmerge)
|
||||
endif()
|
||||
|
||||
ENDIF(HAVE_BASH)
|
||||
endif(HAVE_BASH)
|
||||
|
||||
ENDIF(ENABLE_TESTS)
|
||||
endif(ENABLE_TESTS)
|
||||
|
||||
#IF(MSVC)
|
||||
# SET_TARGET_PROPERTIES(ncdump
|
||||
# set_target_properties(ncdump
|
||||
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
# )
|
||||
# SET_TARGET_PROPERTIES(nccopy
|
||||
# set_target_properties(nccopy
|
||||
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
# )
|
||||
# SET_TARGET_PROPERTIES(ncvalidator
|
||||
# set_target_properties(ncvalidator
|
||||
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
# )
|
||||
# IF(ENABLE_DAP)
|
||||
# SET_TARGET_PROPERTIES(ocprint
|
||||
# set_target_properties(ocprint
|
||||
# PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
# )
|
||||
# ENDIF(ENABLE_DAP)
|
||||
#ENDIF()
|
||||
|
||||
INSTALL(TARGETS ncdump RUNTIME DESTINATION bin COMPONENT utilities)
|
||||
INSTALL(TARGETS nccopy RUNTIME DESTINATION bin COMPONENT utilities)
|
||||
install(TARGETS ncdump 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.
|
||||
# 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(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
|
||||
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)
|
||||
|
||||
ADD_SUBDIRECTORY(cdl)
|
||||
ADD_SUBDIRECTORY(expected)
|
||||
add_subdirectory(cdl)
|
||||
add_subdirectory(expected)
|
||||
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")
|
||||
|
||||
IF(NOT MSVC)
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1" COMPONENT documentation)
|
||||
ENDIF()
|
||||
if(NOT MSVC)
|
||||
install(FILES ${MAN_FILES} DESTINATION "share/man/man1" COMPONENT documentation)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user