diff --git a/CMakeLists.txt b/CMakeLists.txt index c1976df9dd..3002409c9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ ################################## #Minimum required CMake Version -cmake_minimum_required(VERSION 2.8.8) +cmake_minimum_required(VERSION 2.8.9) #Project Name project(netCDF C) @@ -136,14 +136,11 @@ INCLUDE(GenerateExportHeader) ################################ # Default building shared libraries. +# BUILD_SHARED_LIBS is provided by/used by +# CMake directly. OPTION(BUILD_SHARED_LIBS "Configure netCDF as a shared library." ON) -SET(LIB_TYPE STATIC) IF(BUILD_SHARED_LIBS) - SET(LIB_TYPE SHARED) - IF(CMAKE_COMPILER_IS_GNUCC OR APPLE) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fPIC") - ENDIF() + SET(CMAKE_POSITION_INDEPENDENT_CODE ON) ENDIF() # Set some default linux gcc & apple compiler options for @@ -465,8 +462,6 @@ ENDIF() # Option checks ################################ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - # HDF5 cache variables. SET(DEFAULT_CHUNK_SIZE 4194304 CACHE STRING "Default Chunk Cache Size.") SET(DEFAULT_CHUNKS_IN_CACHE 10 CACHE STRING "Default number of chunks in cache.") @@ -747,23 +742,27 @@ IF(ENABLE_DAP) ADD_DEFINITIONS(-DCURL_STATICLIB=1) INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) - # Check to see if CURLOPT_USERNAME is defined. It is present starting version 7.19.1 + # Check to see if CURLOPT_USERNAME is defined. + # It is present starting version 7.19.1. CHECK_C_SOURCE_COMPILES(" #include int main() {int x = CURLOPT_USERNAME;}" HAVE_CURLOPT_USERNAME) -# Check to see if CURLOPT_PASSWORD is defined. It is present starting version 7.19.1 -CHECK_C_SOURCE_COMPILES(" + # Check to see if CURLOPT_PASSWORD is defined. + # It is present starting version 7.19.1. + CHECK_C_SOURCE_COMPILES(" #include int main() {int x = CURLOPT_PASSWORD;}" HAVE_CURLOPT_PASSWORD) -# Check to see if CURLOPT_KEYPASSWD is defined. It is present starting version 7.16.4 -CHECK_C_SOURCE_COMPILES(" + # Check to see if CURLOPT_KEYPASSWD is defined. + # It is present starting version 7.16.4. + CHECK_C_SOURCE_COMPILES(" #include int main() {int x = CURLOPT_KEYPASSWD;}" HAVE_CURLOPT_KEYPASSWD) -# Check to see if CURLINFO_RESPONSE_CODE is defined. It showed up in curl 7.10.7 -CHECK_C_SOURCE_COMPILES(" + # Check to see if CURLINFO_RESPONSE_CODE is defined. + # It showed up in curl 7.10.7. + CHECK_C_SOURCE_COMPILES(" #include int main() {int x = CURLINFO_RESPONSE_CODE;}" HAVE_CURLINFO_RESPONSE_CODE) ENDIF() @@ -1369,49 +1368,10 @@ SET(abs_top_builddir "${CMAKE_BINARY_DIR}") SET(CC_VERSION "${CMAKE_C_COMPILER}") - -# Build CFLAGS from debug and release flags as needed. -SET(CFLAGS_TMP "${CMAKE_C_FLAGS}") - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") - SET(CFLAGS_TMP "${CFLAGS_TMP} ${CMAKE_C_FLAGS_DEBUG}") -ENDIF() - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE") - SET(CFLAGS_TMP "${CFLAGS_TMP} ${CMAKE_C_FLAGS_RELEASE}") -ENDIF() - -SET(CFLAGS "${CFLAGS_TMP} ${CFLAGS}") -# End CFLAGS - -# Build CPPFLAGS from debug and release flags as needed. -SET(CPPFLAGS_TMP "${CMAKE_CPP_FLAGS}") - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") - SET(CPPFLAGS_TMP "${CPPFLAGS_TMP} ${CMAKE_CPP_FLAGS_DEBUG}") -ENDIF() - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE") - SET(CPPFLAGS_TMP "${CPPFLAGS_TMP} ${CMAKE_CPP_FLAGS_RELEASE}") -ENDIF() - -SET(CPPFLAGS "${CPPFLAGS_TMP} ${CPPFLAGS}") -# End CPPFLAGS - -# Build LDFLAGS from debug and release flags as needed. -SET(LDFLAGS_TMP "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_LINKER_FLAGS}") - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") - SET(LDFLAGS_TMP "${LDFLAGS_TMP} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${CMAKE_LINKER_FLAGS_DEBUG}") -ENDIF() - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE") - SET(LDFLAGS_TMP "${LDFLAGS_TMP} ${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${CMAKE_LINKER_FLAGS_RELEASE}") -ENDIF() - -SET(LDFLAGS "${LDFLAGS_TMP} ${LDFLAGS}") -# End LDFLAGS - +# Build *FLAGS for libnetcdf.settings. +SET(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}") +SET(CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${CMAKE_BUILD_TYPE}}") +SET(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE}}") is_disabled(BUILD_SHARED_LIBS enable_static) is_enabled(BUILD_SHARED_LIBS enable_shared) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 272a78a75c..a8e047eafa 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -9,6 +9,8 @@ This file contains a high-level description of this package's evolution. Release ### 4.3.3-rc1 Released TBD +* Bumped minimum CMake version to `2.8.9` from `2.8.8` as part of a larger pull request contributed by Nico Schlömer. [Pull Request #64](https://github.com/Unidata/netcdf-c/pull/64) + * Replaced the `NetCDF Library Architecture` image with an updated version from the 2012 NetCDF Workshop slides. * Fix HDF4 files to support chunking. diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index f62e696b2a..a5e0844cca 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -1,17 +1,12 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - - ##### # Build doxygen documentation, if need be. ##### IF(ENABLE_DOXYGEN) - # The following is redundant but does not hurt anything. + # The following is redundant but does not hurt anything. FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.html ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_SOURCE_DIR}/*.doc ${CMAKE_CURRENT_SOURCE_DIR}/*.xml ${CMAKE_CURRENT_SOURCE_DIR}/*.m4 ${CMAKE_CURRENT_SOURCE_DIR}/*.texi) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - + # Set abs_top_srcdir to work with the autotools # doxyfile template. SET(abs_top_srcdir ${CMAKE_SOURCE_DIR}) @@ -23,7 +18,7 @@ IF(ENABLE_DOXYGEN) ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.guide @ONLY) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.tutorial.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.tutorial @ONLY) - + # We need to loop through twice. First to generate tags. ADD_CUSTOM_TARGET(all_doc_tags ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @@ -40,7 +35,7 @@ IF(ENABLE_DOXYGEN) WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating Tutorial Tags" VERBATIM ) - + # Second, generate documentation that uses the tags. ADD_CUSTOM_TARGET(doc_all ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @@ -58,19 +53,19 @@ IF(ENABLE_DOXYGEN) COMMENT "Generating Tutorial Tags" VERBATIM ) - # Copy the image files used by markdown documentation + # Copy the image files used by markdown documentation # manually. - FILE(GLOB IMG_FILES ${CMAKE_CURRENT_BINARY_DIR}/images/*.jpg + FILE(GLOB IMG_FILES ${CMAKE_CURRENT_BINARY_DIR}/images/*.jpg ${CMAKE_CURRENT_BINARY_DIR}/images/*.png) - - FILE(COPY ${IMG_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/html) - + + FILE(COPY ${IMG_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/html) + INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT documentation) - + ENDIF(ENABLE_DOXYGEN) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am netcdf.m4 DoxygenLayout.xml Doxyfile.in Doxyfile.guide.in footer.html mainpage.dox tutorial.dox install.dox dispatch.dox guide.dox types.dox notes.dox cdl.dox architecture.dox internal.dox install-fortran.dox Doxyfile.in.cmake windows-binaries.md building-with-cmake.md) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index caa7cea4cf..da62844443 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - SET(exam_C_tests simple_xy_wr simple_xy_rd sfc_pres_temp_wr sfc_pres_temp_rd pres_temp_4D_wr pres_temp_4D_rd) SET(exam_C_tests_source "") -FOREACH(F ${exam_C_tests}) +FOREACH(F ${exam_C_tests}) set(exam_C_tests_source ${exam_C_test_source} ${F}.c) ENDFOREACH() diff --git a/examples/CDL/CMakeLists.txt b/examples/CDL/CMakeLists.txt index f28f389a8c..de802279ab 100644 --- a/examples/CDL/CMakeLists.txt +++ b/examples/CDL/CMakeLists.txt @@ -1,8 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - - SET(CDL_EXAMPLE_TESTS create_sample_files do_comps) FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f0e72e0b30..6c6c7ba2eb 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - ADD_SUBDIRECTORY(C) IF(BUILD_UTILITIES) diff --git a/h5_test/CMakeLists.txt b/h5_test/CMakeLists.txt index 7e8b10f4f6..e8f3d56dcb 100644 --- a/h5_test/CMakeLists.txt +++ b/h5_test/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - SET(H5TESTS tst_h_files tst_h_files2 tst_h_files4 tst_h_atts tst_h_atts3 tst_h_atts4 tst_h_vars tst_h_vars2 tst_h_vars3 tst_h_grps tst_h_compounds tst_h_compounds2 tst_h_wrt_cmp tst_h_rd_cmp tst_h_vl tst_h_opaques tst_h_strings tst_h_strings1 tst_h_strings2 tst_h_ints tst_h_dimscales tst_h_dimscales1 tst_h_dimscales2 tst_h_dimscales3 tst_h_enums tst_h_dimscales4) FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h5 ${CMAKE_CURRENT_SOURCE_DIR}/*.nc) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index a2117e2b4f..1e1592204a 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} Makefile.am CMakeLists.txt) ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/libdap2/CMakeLists.txt b/libdap2/CMakeLists.txt index 086f3d06cf..42e4083c3d 100644 --- a/libdap2/CMakeLists.txt +++ b/libdap2/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - SET(dap2_SOURCES constraints.c dapcvt.c dapalign.c dapodom.c daputil.c ncdaperr.c cdf.c cache.c dapdump.c dapdebug.c dapattr.c ncd2dispatch.c getvara.c dceconstraints.c dcetab.c dceparse.c dcelex.c) -add_library(dap2 OBJECT ${dap2_SOURCES}) +add_library(dap2 OBJECT ${dap2_SOURCES}) ### # Options related to the man page generation. diff --git a/libdispatch/CMakeLists.txt b/libdispatch/CMakeLists.txt index 06ebc8691d..c3f718c8b3 100644 --- a/libdispatch/CMakeLists.txt +++ b/libdispatch/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - 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 nclog.c dstring.c dutf8proc.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c dsubstrate.c nc.c nclistmgr.c) IF(USE_NETCDF4) diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt index c6dfcb4a8f..8b12cc52a7 100644 --- a/liblib/CMakeLists.txt +++ b/liblib/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - SET(liblib_LIBS dispatch netcdf3) ##### @@ -28,7 +24,7 @@ FOREACH(LIBS ${liblib_LIBS}) SET(LARGS ${LARGS} $) ENDFOREACH() -ADD_LIBRARY(netcdf ${LIB_TYPE} stub.c ${LARGS} ) +ADD_LIBRARY(netcdf stub.c ${LARGS} ) IF(MOD_NETCDF_NAME) SET_TARGET_PROPERTIES(netcdf PROPERTIES LIBRARY_OUTPUT_NAME ${NETCDF_LIB_NAME}) SET_TARGET_PROPERTIES(netcdf PROPERTIES ARCHIVE_OUTPUT_NAME ${NETCDF_LIB_NAME}) diff --git a/libsrc/CMakeLists.txt b/libsrc/CMakeLists.txt index 17583c05df..7d221fd688 100644 --- a/libsrc/CMakeLists.txt +++ b/libsrc/CMakeLists.txt @@ -1,11 +1,6 @@ ## This is a CMake file, part of Unidata's netCDF package. # Copyright 2012-2013, see the COPYRIGHT file for more information. -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - - # Process these files with m4. SET(m4_SOURCES attr ncx putget t_ncxx) foreach (f ${m4_SOURCES}) diff --git a/libsrc4/CMakeLists.txt b/libsrc4/CMakeLists.txt index af893f92a3..3d9e6c4772 100644 --- a/libsrc4/CMakeLists.txt +++ b/libsrc4/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - # Process these files with m4. SET(libsrc4_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4file.c nc4grp.c nc4type.c nc4var.c ncfunc.c nc4internal.c nc4hdf.c) diff --git a/libsrc5/CMakeLists.txt b/libsrc5/CMakeLists.txt index 81350ef0f0..5859425aa0 100644 --- a/libsrc5/CMakeLists.txt +++ b/libsrc5/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - SET(libsrc5_SOURCES nc5dispatch.c) add_library(netcdf5 OBJECT ${libsrc5_SOURCES}) diff --git a/nc_test/CMakeLists.txt b/nc_test/CMakeLists.txt index e6edb005f6..ba2203c43a 100644 --- a/nc_test/CMakeLists.txt +++ b/nc_test/CMakeLists.txt @@ -1,12 +1,8 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") SET (nc_test_m4_SOURCES test_get test_put) FOREACH (F ${nc_test_m4_SOURCES}) GEN_m4(${F}) ENDFOREACH() - SET (nc_test_SRC nc_test.c error.c test_get.c test_put.c test_read.c test_write.c util.c) ADD_EXECUTABLE(nc_test ${nc_test_SRC}) TARGET_LINK_LIBRARIES(nc_test netcdf) diff --git a/nc_test4/CMakeLists.txt b/nc_test4/CMakeLists.txt index bf95fdcf56..542831492e 100644 --- a/nc_test4/CMakeLists.txt +++ b/nc_test4/CMakeLists.txt @@ -1,6 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") # Some extra tests SET(NC4_TESTS tst_dims tst_dims2 tst_dims3 tst_files tst_files4 tst_vars tst_varms tst_unlim_vars tst_converts tst_converts2 tst_grps tst_grps2 @@ -71,13 +68,13 @@ IF(USE_HDF4_FILE_TESTS) ENDIF() IF(TEST_PARALLEL) - build_bin_test(tst_mpi_parallel) + build_bin_test(tst_mpi_parallel) build_bin_test(tst_parallel) build_bin_test(tst_parallel3) build_bin_test(tst_parallel4) build_bin_test(tst_nc4perf) add_sh_test(nc_test4 run_par_test) -ENDIF() +ENDIF() ## Specify files to be distributed by 'make dist' FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh) diff --git a/ncdap_test/CMakeLists.txt b/ncdap_test/CMakeLists.txt index 2a572fd682..5fd28160fe 100644 --- a/ncdap_test/CMakeLists.txt +++ b/ncdap_test/CMakeLists.txt @@ -1,8 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - - SET(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR}) remove_definitions(-DDLL_EXPORT) diff --git a/ncdap_test/expected3/CMakeLists.txt b/ncdap_test/expected3/CMakeLists.txt index 2c8b26fed4..d46021ec04 100644 --- a/ncdap_test/expected3/CMakeLists.txt +++ b/ncdap_test/expected3/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/expected4/CMakeLists.txt b/ncdap_test/expected4/CMakeLists.txt index 2c8b26fed4..d46021ec04 100644 --- a/ncdap_test/expected4/CMakeLists.txt +++ b/ncdap_test/expected4/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/expectremote3/CMakeLists.txt b/ncdap_test/expectremote3/CMakeLists.txt index 2c8b26fed4..d46021ec04 100644 --- a/ncdap_test/expectremote3/CMakeLists.txt +++ b/ncdap_test/expectremote3/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/expectremote4/CMakeLists.txt b/ncdap_test/expectremote4/CMakeLists.txt index 2c8b26fed4..d46021ec04 100644 --- a/ncdap_test/expectremote4/CMakeLists.txt +++ b/ncdap_test/expectremote4/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/expecttds3/CMakeLists.txt b/ncdap_test/expecttds3/CMakeLists.txt index 2c8b26fed4..d46021ec04 100644 --- a/ncdap_test/expecttds3/CMakeLists.txt +++ b/ncdap_test/expecttds3/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/nocacheremote3/CMakeLists.txt b/ncdap_test/nocacheremote3/CMakeLists.txt index 2c8b26fed4..d46021ec04 100644 --- a/ncdap_test/nocacheremote3/CMakeLists.txt +++ b/ncdap_test/nocacheremote3/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/nocacheremote4/CMakeLists.txt b/ncdap_test/nocacheremote4/CMakeLists.txt index 2c8b26fed4..d46021ec04 100644 --- a/ncdap_test/nocacheremote4/CMakeLists.txt +++ b/ncdap_test/nocacheremote4/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/special3/CMakeLists.txt b/ncdap_test/special3/CMakeLists.txt index caf96841b2..2332d8f855 100644 --- a/ncdap_test/special3/CMakeLists.txt +++ b/ncdap_test/special3/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdap_test/testdata3/CMakeLists.txt b/ncdap_test/testdata3/CMakeLists.txt index 2c8b26fed4..ce0734596c 100644 --- a/ncdap_test/testdata3/CMakeLists.txt +++ b/ncdap_test/testdata3/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) diff --git a/ncdump/CMakeLists.txt b/ncdump/CMakeLists.txt index 07c1d77fca..732dfc4dc9 100644 --- a/ncdump/CMakeLists.txt +++ b/ncdump/CMakeLists.txt @@ -1,14 +1,8 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - IF(BUILD_SHARED_LIBS AND WIN32) remove_definitions(-DDLL_EXPORT) remove_definitions(-DDLL_NETCDF) ENDIF() - - #IF(EXTRA_TESTS) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ctest.c @@ -154,8 +148,6 @@ FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SO SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} test0.cdl ref_ctest1_nc4.cdl ref_ctest1_nc4c.cdl ref_tst_solar_1.cdl ref_tst_solar_2.cdl ref_tst_small.cdl tst_ncml.cdl ref1.ncml ref_tst_group_data.cdl ref_tst_enum_data.cdl ref_tst_opaque_data.cdl ref_tst_string_data.cdl ref_tst_vlen_data.cdl ref_tst_comp.cdl ref_tst_unicode.cdl ref_tst_nans.cdl small.cdl small2.cdl ref_tst_utf8.cdl ref_tst_fillbug.cdl tst_calendars.cdl ref_times.cdl ref_tst_special_atts.cdl ref_tst_noncoord.cdl ref_tst_compounds2.nc ref_tst_compounds2.cdl ref_tst_compounds3.nc ref_tst_compounds3.cdl ref_tst_compounds4.nc ref_tst_compounds4.cdl ref_tst_group_data_v23.cdl tst_mslp.cdl ref_tst_format_att.cdl ref_tst_format_att_64.cdl ref_nc_test_netcdf4_4_0.nc ref_nc_test_netcdf4.cdl ref_tst_special_atts3.cdl tst_brecs.cdl ref_tst_grp_spec0.cdl ref_tst_grp_spec.cdl ref_tst_grp_spec0.cdl ref_tst_grp_spec.cdl ref_tst_charfill.cdl tst_charfill.cdl ref_tst_mud4.cdl ref_tst_mud4-bc.cdl ref_tst_ncf213.cdl CMakeLists.txt Makefile.am XGetopt.c nccopy.1 ncdump.1) ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") - - SET(CLEANFILES test0.nc test1.cdl test1.nc test2.cdl ctest1.cdl ctest.c ctest64.c ctest0.nc ctest0_64.nc c1.cdl c1_4.cdl ctest1_64.cdl c0.nc c0_4.nc small.nc small2.nc c0tmp.nc c1.ncml utf8.cdl utf8_64.cdl utf8.nc utf8_64.nc tmp.cdl tst_vlen_data.nc tst_utf8.nc tst_special_atts.nc tst_unicode.nc tst_solar_2.nc tst_string_data.nc tst_calendars.nc tst_nans.nc tst_opaque_data.nc tst_solar_cmp.nc tst_enum_data.nc tst_solar_1.nc tst_mslp_64.nc tst_mslp.nc tst_comp2.nc tst_ncml.nc tst_fillbug.nc tst_group_data.nc tst_small.nc tst_comp.nc tst_unicode.cdl tst_group_data.cdl tst_compounds2.cdl tst_comp.cdl tst_enum_data.cdl tst_small.cdl tst_times.cdl tst_solar_2.cdl tst_string_data.cdl tst_fillbug.cdl tst_opaque_data.cdl tst_compounds4.cdl tst_utf8.cdl tst_compounds3.cdl tst_special_atts.cdl tst_nans.cdl tst_format_att_64.cdl tst_vlen_data.cdl tst_solar_1.cdl tst_format_att.cdl tst_inflated.nc tmp_subset.cdl tst_inflated4.nc tst_deflated.nc tst_chunking.nc tmp*.nc tst_charfill.nc tmp_tst_charfill.cdl iter.* tst_nc_test_netcdf4_4_0.cdl tst_mud4.nc tst_mud4.cdl tst_mud4-bc.cdl) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}") diff --git a/ncdump/cdl4/CMakeLists.txt b/ncdump/cdl4/CMakeLists.txt index a384685c0d..8c089e215e 100644 --- a/ncdump/cdl4/CMakeLists.txt +++ b/ncdump/cdl4/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncdump/expected4/CMakeLists.txt b/ncdump/expected4/CMakeLists.txt index eaea36d735..f5e836ea67 100644 --- a/ncdump/expected4/CMakeLists.txt +++ b/ncdump/expected4/CMakeLists.txt @@ -1,10 +1,6 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*) FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.dmp) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncgen/CMakeLists.txt b/ncgen/CMakeLists.txt index 4974885ff2..369344d511 100644 --- a/ncgen/CMakeLists.txt +++ b/ncgen/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - 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 nc_iter.c ConvertUTF.c ) IF(USE_X_GETOPT) diff --git a/ncgen3/CMakeLists.txt b/ncgen3/CMakeLists.txt index e5619d3c0c..670fc5993c 100644 --- a/ncgen3/CMakeLists.txt +++ b/ncgen3/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - SET(ncgen3_FILES main.c load.c escapes.c getfill.c init.c genlib.c ncgentab.c) FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl) diff --git a/nctest/CMakeLists.txt b/nctest/CMakeLists.txt index 6cf1bb601f..d1ac3d58a2 100644 --- a/nctest/CMakeLists.txt +++ b/nctest/CMakeLists.txt @@ -1,7 +1,3 @@ -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) diff --git a/oc2/CMakeLists.txt b/oc2/CMakeLists.txt index 58f0a3d46f..941e9ea261 100644 --- a/oc2/CMakeLists.txt +++ b/oc2/CMakeLists.txt @@ -1,7 +1,3 @@ -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE_DIRECTORIES(".") - SET(oc_SOURCES oc.c daplex.c dapparse.c daptab.c occlientparams.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocrc.c ocread.c ocutil.c ocbytes.c oclist.c ocuri.c oclog.c xxdr.c) @@ -12,4 +8,4 @@ add_library(oc2 OBJECT ${oc_SOURCES}) FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} dap.y) -ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") \ No newline at end of file +ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")