Corrected an issue with disabling the V2 API support in cmake-based builds.

This commit is contained in:
Ward Fisher 2014-04-03 10:45:22 -06:00
parent 733f6257b0
commit 74209d373e
4 changed files with 14 additions and 3 deletions

View File

@ -480,7 +480,10 @@ IF(MSVC)
ENDIF()
# Option to build netCDF Version 2
OPTION (BUILD_V2 "Build netCDF Version 2." ON)
OPTION (ENABLE_V2_API "Build netCDF Version 2." ON)
IF(NOT ENABLE_V2_API)
SET(NO_NETCDF_2 ON)
ENDIF()
# Option to build utilities
OPTION (BUILD_UTILITIES "Build ncgen, ncgen3, ncdump." ON)
@ -1118,7 +1121,9 @@ ENDIF()
# Enable tests
IF(ENABLE_TESTS)
ADD_SUBDIRECTORY(nctest)
IF(ENABLE_V2_API)
ADD_SUBDIRECTORY(nctest)
ENDIF()
ADD_SUBDIRECTORY(nc_test)
IF(USE_NETCDF4)
ADD_SUBDIRECTORY(nc_test4)

View File

@ -69,6 +69,7 @@ are set when opening a binary file on Windows. */
/* Various other options. */
#cmakedefine BUILD_V2 1
#cmakedefine NO_NETCDF_2 1
#cmakedefine USE_FSYNC 1
#cmakedefine ENABLE_DOXYGEN 1
#cmakedefine ENABLE_INTERNAL_DOCS 1

View File

@ -21,6 +21,11 @@ IF(NOT MSVC)
SET(NC4_TESTS ${NC4_TESTS} tst_interops5 tst_camrun)
ENDIF()
# If the v2 API was built, add the test program.
IF(ENABLE_V2_API)
build_bin_test(tst_v2)
ENDIF()
IF(LARGE_FILE_TESTS)
SET(NC4_TESTS ${NC4_TESTS} tst_large tst_large2)
ENDIF()

View File

@ -1,6 +1,6 @@
/* This is part of the netCDF package.
Copyright 2005 University Corporation for Atmospheric Research/Unidata
See COPYRIGHT file for conditions of use.
See COPYRIGHT file for conditions of use.
Test netcdf-4 variables.
$Id: tst_vars2.c,v 1.35 2010/01/25 21:01:08 ed Exp $