diff --git a/CMakeLists.txt b/CMakeLists.txt index 34f2c70b3..7b50b163b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -481,8 +481,9 @@ ENDIF() # Option to build netCDF Version 2 OPTION (ENABLE_V2_API "Build netCDF Version 2." ON) +SET(BUILD_V2 ${ENABLE_V2_API}) IF(NOT ENABLE_V2_API) - SET(NO_NETCDF_2 ON) + SET(NO_NETCDF_2 ON) ENDIF() # Option to build utilities @@ -1122,7 +1123,7 @@ ENDIF() # Enable tests IF(ENABLE_TESTS) IF(ENABLE_V2_API) - ADD_SUBDIRECTORY(nctest) + ADD_SUBDIRECTORY(nctest) ENDIF() ADD_SUBDIRECTORY(nc_test) IF(USE_NETCDF4) diff --git a/nctest/CMakeLists.txt b/nctest/CMakeLists.txt index 9a98e88cb..9c4bcc392 100644 --- a/nctest/CMakeLists.txt +++ b/nctest/CMakeLists.txt @@ -2,7 +2,6 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON) INCLUDE_DIRECTORIES(".") - 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)