mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-12 15:45:21 +08:00
This commit is contained in:
parent
0607b62375
commit
14619ec4c4
@ -73,6 +73,12 @@ OPTION (BUILD_MMAP "Use MMAP." OFF)
|
||||
OPTION (BUILD_DISKLESS "Build Diskless." OFF)
|
||||
|
||||
# Option Logging, only valid for netcdf4.
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
OPTION (LOGGING "Enable Logging." OFF)
|
||||
|
||||
# Option to use HDF4
|
||||
@ -200,15 +206,13 @@ OPTION (VALGRIND_TESTS "Build with valgrind tests (valgrind is required, static
|
||||
# Provide the option to perform coverage tests.
|
||||
OPTION (ENABLE_COVERAGE_TESTS "Enable compiler flags needed to perform coverage tests." OFF)
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
#ADD_DEFINITION(-fprofile-arcs)
|
||||
#ADD_DEFINITION(-ftest-coverage)
|
||||
#ADD_DEFINITION(-g-O0)
|
||||
SET(CMAKE_CXX_FLAGS="-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS="-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS="-fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_EXE_LINKER_FLAGSx "-fprofile-arcs -ftest-coverage")
|
||||
MESSAGE(STATUS "Coverage Tests: On.")
|
||||
ENDIF()
|
||||
|
||||
# Set some of the options as advanced.
|
||||
MARK_AS_ADVANCED(ENABLE_DOXYGEN ENABLE_INTERNAL_DOCS VALGRIND_TESTS ENABLE_PNETCDF BUILD_CDMREMOTE ENABLE_COVERAGE_TESTS)
|
||||
|
||||
#####
|
||||
@ -369,6 +373,8 @@ IF(ENABLE_TESTS)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
#####
|
||||
# Moving on to CPack, install packages.
|
||||
#####
|
||||
|
@ -1,13 +1,6 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(cdmr_SOURCES nccrcvt.c nccr.c nccrdispatch.c crmeta.c nccrproto.c nccrgetvarx.c crdebug.c crutil.c nccrdump.c ncStreamx.c curlwrap.c ast_byteio.c ast_curl.c ast_internal.c ast_runtime.c ast_util.c ast_debug.c cceparse.c cceconstraints.c)
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
SET(dap2_SOURCES constraints3.c common34.c dapcvt.c dapalign.c dapodom.c daputil.c ncdaperr.c cdf3.c cache.c dapdump.c dapdebug.c dapattr3.c ncd3dispatch.c ncdap3.c ncdap3a.c getvara3.c dceconstraints.c dcetab.c dceparse.c dcelex.c)
|
||||
|
||||
|
@ -1,13 +1,6 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(libdispatch_SOURCES dparallel.c dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c dnclog.c dstring.c dutf8proc.c nc_uri.c nclist.c ncbytes.c nchashmap.c nctime.c dsubstrate.c)
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
SET(liblib_LIBS dispatch netcdf3)
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
# Process these files with m4.
|
||||
SET(m4_SOURCES attr ncx putget t_ncxx)
|
||||
|
@ -1,12 +1,6 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
# Process these files with m4.
|
||||
|
||||
|
@ -4,13 +4,6 @@ INCLUDE_DIRECTORIES(".")
|
||||
|
||||
SET (nc_test_SRC nc_test.c error.c test_get.c test_put.c test_read.c test_write.c util.c)
|
||||
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(nc_test ${nc_test_SRC})
|
||||
TARGET_LINK_LIBRARIES(nc_test netcdf)
|
||||
|
||||
|
@ -11,14 +11,6 @@ tst_xplatform tst_xplatform2 tst_h_atts2 tst_endian_fill
|
||||
t_type cdm_sea_soundings tst_camrun tst_vl
|
||||
tst_vars2 tst_files5 tst_files6 tst_sync tst_h_strbug)
|
||||
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
# Copy some test files from current source dir to out-of-tree build dir.
|
||||
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc)
|
||||
|
@ -7,13 +7,6 @@ remove_definitions(-DDLL_EXPORT)
|
||||
SET(ncdump_FILES ncdump.c utils.c vardata.c dumplib.c indent.c nctime0.c )
|
||||
SET(nccopy_FILES nccopy.c utils.c nciter.c chunkspec.c utils.c dimmap.c)
|
||||
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
# Base tests
|
||||
SET(ncDumpChecks rewrite-scalar tst_utf8)
|
||||
|
||||
|
@ -2,14 +2,6 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(ncgen_FILES generate.c main.c cdata.c bindata.c genchar.c cvt.c data.c debug.c escapes.c genc.c genbin.c generr.c genlib.c getfill.c odom.c offsets.c semantics.c ncgentab.c dump.c util.c bytebuffer.c list.c genf77.c f77data.c genj.c jdata.c nciter.c ConvertUTF.c )
|
||||
|
||||
ADD_EXECUTABLE(ncgen ${ncgen_FILES})
|
||||
|
@ -2,13 +2,6 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
SET(ncgen3_FILES main.c load.c escapes.c getfill.c init.c genlib.c ncgentab.c)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
|
@ -2,13 +2,6 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
SET(nctest_SRC add.c atttests.c cdftests.c dimtests.c driver.c emalloc.c error.c misctest.c rec.c slabs.c val.c vardef.c varget.c vargetg.c varput.c varputg.c vartests.c vputget.c vputgetg.c)
|
||||
|
||||
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc)
|
||||
|
@ -4,36 +4,8 @@ INCLUDE_DIRECTORIES(".")
|
||||
|
||||
# Process these files with m4.
|
||||
|
||||
#SET(oc_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4file.c nc4grp.c nc4type.c nc4var.c ncfunc.c nc4internal.c nc4hdf.c error4.c)
|
||||
|
||||
SET(oc_SOURCES occurlfunctions.c dapparse.c daplex.c ocuri.c ochttp.c ocbytes.c oc.c occontent.c ocdebug.c ocdrno.c ocdump.c ocinternal.c oclist.c oclog.c ocnode.c ocutil.c occlientparams.c ocrc.c ocread.c xxdr.c daptab.c)
|
||||
|
||||
add_library(oc OBJECT ${oc_SOURCES})
|
||||
|
||||
|
||||
|
||||
|
||||
###
|
||||
# Options related to the man page generation.
|
||||
###
|
||||
|
||||
###
|
||||
# The C API man page.
|
||||
###
|
||||
|
||||
set(man_MANS netcdf.3)
|
||||
|
||||
set(ARGS_MANPAGE -DAPI=C)
|
||||
|
||||
IF (USE_NETCDF4)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
||||
ENDIF(USE_NETCDF4)
|
||||
|
||||
IF (BUILD_DAP)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
||||
ENDIF(BUILD_DAP)
|
||||
|
||||
IF (BUILD_PARALLEL)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||
ENDIF(BUILD_PARALLEL)
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
# For some reason, these appear to need to be set in each folder.
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wun used-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecate d -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
SET(oc_SOURCES occurlfunctions.c dapparse.c daplex.c ocdata.c ocuri.c ochttp.c ocbytes.c oc.c ocdebug.c ocdump.c ocinternal.c occompile.c oclist.c oclog.c ocnode.c ocutil.c occlientparams.c ocrc.c ocread.c xxdr.c daptab.c)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user