"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CMakeLists.txt" between
netcdf-fortran-4.4.4.tar.gz and netcdf-fortran-4.4.5.tar.gz

About: NetCDF (network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data (Fortran library).

CMakeLists.txt  (netcdf-fortran-4.4.4):CMakeLists.txt  (netcdf-fortran-4.4.5)
skipping to change at line 20 skipping to change at line 20
#Project Name for netCDF-Fortran #Project Name for netCDF-Fortran
PROJECT (NC4F Fortran C) PROJECT (NC4F Fortran C)
SET(NC4F_CTEST_PROJECT_NAME "netcdf-fortran") SET(NC4F_CTEST_PROJECT_NAME "netcdf-fortran")
set(PACKAGE "${NC4F_CTEST_PROJECT_NAME}" CACHE STRING "") set(PACKAGE "${NC4F_CTEST_PROJECT_NAME}" CACHE STRING "")
#Project Version #Project Version
SET(NC4F_VERSION_MAJOR 4) SET(NC4F_VERSION_MAJOR 4)
SET(NC4F_VERSION_MINOR 4) SET(NC4F_VERSION_MINOR 4)
SET(NC4F_VERSION_PATCH 4) SET(NC4F_VERSION_PATCH 5)
SET(NC4F_VERSION_NOTE "") SET(NC4F_VERSION_NOTE "")
SET(NC4F_VERSION ${NC4F_VERSION_MAJOR}.${NC4F_VERSION_MINOR}.${NC4F_VERSION_PATC H}${NC4F_VERSION_NOTE}) SET(NC4F_VERSION ${NC4F_VERSION_MAJOR}.${NC4F_VERSION_MINOR}.${NC4F_VERSION_PATC H}${NC4F_VERSION_NOTE})
SET(VERSION ${NC4F_VERSION}) SET(VERSION ${NC4F_VERSION})
SET(NC4F_LIB_VERSION 6.1.1) SET(NC4F_LIB_VERSION 6.2.1)
SET(NC4F_SO_VERSION 6) SET(NC4F_SO_VERSION 6)
SET(PACKAGE_VERSION ${VERSION}) SET(PACKAGE_VERSION ${VERSION})
# Set known dependencies. # Set known dependencies.
SET(EXTRA_DEPS "") SET(EXTRA_DEPS "")
# Get system configuration, # Get system configuration,
# Use it to determine osname, # Use it to determine osname,
# os release, cpu. These will be used # os release, cpu. These will be used
# when committing to CDash. # when committing to CDash.
find_program(UNAME NAMES uname) find_program(UNAME NAMES uname)
skipping to change at line 85 skipping to change at line 85
FIND_PROGRAM(NC_DOT NAMES dot) FIND_PROGRAM(NC_DOT NAMES dot)
# For CMAKE_INSTALL_LIBDIR # For CMAKE_INSTALL_LIBDIR
INCLUDE(GNUInstallDirs) INCLUDE(GNUInstallDirs)
IF(MSVC) IF(MSVC)
SET(GLOBAL PROPERTY USE_FOLDERS ON) SET(GLOBAL PROPERTY USE_FOLDERS ON)
ENDIF() ENDIF()
# auto-configure style checks, other CMake modules. # auto-configure style checks, other CMake modules.
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) INCLUDE (CheckLibraryExists)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) INCLUDE (CheckIncludeFile)
INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) INCLUDE (CheckTypeSize)
INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) INCLUDE (CheckFunctionExists)
INCLUDE (${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake) INCLUDE (CheckCXXSourceCompiles)
INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake) INCLUDE (TestBigEndian)
INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) INCLUDE (CheckSymbolExists)
INCLUDE (${CMAKE_ROOT}/Modules/GetPrerequisites.cmake) INCLUDE (GetPrerequisites)
FIND_PACKAGE(PkgConfig QUIET) FIND_PACKAGE(PkgConfig QUIET)
# Enable 'dist and distcheck'. # Enable 'dist and distcheck'.
# File adapted from http://ensc.de/cmake/FindMakeDist.cmake # File adapted from http://ensc.de/cmake/FindMakeDist.cmake
# TODO: this can't currently be found, need # TODO: this can't currently be found, need
# FIND_PACKAGE(MakeDist) # FIND_PACKAGE(MakeDist)
# End 'enable dist and distcheck' # End 'enable dist and distcheck'
# Set the build type. # Set the build type.
IF (NOT CMAKE_BUILD_TYPE) IF (NOT CMAKE_BUILD_TYPE)
skipping to change at line 234 skipping to change at line 234
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT" PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
) )
ENDIF() ENDIF()
ADD_TEST(${prefix}_${F} bash "-c" "TOPSRCDIR=${CMAKE_SOURCE_DIR} ${CMAKE_CURRE NT_BINARY_DIR}/${prefix}_${F}") ADD_TEST(${prefix}_${F} bash "-c" "TOPSRCDIR=${CMAKE_SOURCE_DIR} ${CMAKE_CURRE NT_BINARY_DIR}/${prefix}_${F}")
IF(MSVC) IF(MSVC)
SET_PROPERTY(TARGET ${prefix}_${F} PROPERTY FOLDER "tests") SET_PROPERTY(TARGET ${prefix}_${F} PROPERTY FOLDER "tests")
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
# Build a binary used by a script, but don't make a test out of it.
MACRO(build_bin_test F)
ADD_EXECUTABLE(${F} ${F}.c)
TARGET_LINK_LIBRARIES(${F} netcdff)
IF(MSVC)
SET_TARGET_PROPERTIES(${F}
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
)
ENDIF()
ENDMACRO()
# Binary tests which are used by a script looking for a specific name. # Binary tests which are used by a script looking for a specific name.
MACRO(add_bin_test_no_prefix F) MACRO(add_bin_test_no_prefix F)
build_bin_test(${F}) build_bin_test(${F})
ADD_TEST(${F} ${EXECUTABLE_OUTPUT_PATH}/${F}) ADD_TEST(${F} ${EXECUTABLE_OUTPUT_PATH}/${F})
IF(MSVC) IF(MSVC)
SET_PROPERTY(TEST ${F} PROPERTY FOLDER "tests/") SET_PROPERTY(TEST ${F} PROPERTY FOLDER "tests/")
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
MACRO(add_bin_test prefix F) MACRO(add_bin_test prefix F)
skipping to change at line 286 skipping to change at line 275
MACRO(print_conf_summary) MACRO(print_conf_summary)
MESSAGE("") MESSAGE("")
MESSAGE("") MESSAGE("")
MESSAGE(STATUS "CMake Summary:") MESSAGE(STATUS "CMake Summary:")
MESSAGE("") MESSAGE("")
MESSAGE(STATUS "\tBuild Type:\t\t\t" ${CMAKE_BUILD_TYPE}) MESSAGE(STATUS "\tBuild Type:\t\t\t" ${CMAKE_BUILD_TYPE})
MESSAGE(STATUS "\tBuilding Shared Libraries:\t" ${BUILD_SHARED_LIBS}) MESSAGE(STATUS "\tBuilding Shared Libraries:\t" ${BUILD_SHARED_LIBS})
MESSAGE(STATUS "\tBuilding netCDF-4:\t\t" ${ENABLE_NETCDF4}) MESSAGE(STATUS "\tBuilding netCDF-4:\t\t" ${ENABLE_NETCDF4})
MESSAGE(STATUS "\tBuilding DAP Support:\t\t" ${ENABLE_DAP}) MESSAGE(STATUS "\tBuilding DAP Support:\t\t" ${ENABLE_DAP})
MESSAGE(STATUS "\tLogging Support:\t\t" ${STATUS_LOGGING}) MESSAGE(STATUS "\tLogging Support:\t\t" ${STATUS_LOGGING})
IF(STATUS_PNETCDF) MESSAGE(STATUS "\tEnabling CDF5:\t\t\t" ${ENABLE_CDF5})
MESSAGE(STATUS "\tUsing pnetcdf:\t\t\t" ${STATUS_PNETCDF}) MESSAGE(STATUS "\tRelaxed check NC_EINVALCOORDS:\t" ${NF_RELAX_COORD_BOUND})
ENDIF(STATUS_PNETCDF) MESSAGE(STATUS "\tBuilding Parallel IO:\t\t" ${BUILD_PARALLEL})
MESSAGE(STATUS "\tUsing NetCDF4 Parallel IO:\t" ${NF_HAS_PARALLEL4})
MESSAGE(STATUS "\tUsing Parallel IO:\t\t" ${STATUS_PARALLEL}) MESSAGE(STATUS "\tUsing PnetCDF Parallel IO:\t" ${NF_HAS_PNETCDF})
MESSAGE(STATUS "\tTesting Parallel IO:\t\t" ${TEST_PARALLEL})
IF(CMAKE_PREFIX_PATH) IF(CMAKE_PREFIX_PATH)
MESSAGE(STATUS "\tCMake Prefix Path:\t\t" "${CMAKE_PREFIX_PATH}") MESSAGE(STATUS "\tCMake Prefix Path:\t\t" "${CMAKE_PREFIX_PATH}")
ENDIF() ENDIF()
SET(ALL_DEP_LIBS "${NETCDF_C_LIBRARY};${EXTRA_DEPS}") SET(ALL_DEP_LIBS "${NETCDF_C_LIBRARY};${EXTRA_DEPS}")
MESSAGE(STATUS "\tLinking against:\t\t" "${ALL_DEP_LIBS}") MESSAGE(STATUS "\tLinking against:\t\t" "${ALL_DEP_LIBS}")
FOREACH(_LIB ${EXTRA_DEPS}) FOREACH(_LIB ${EXTRA_DEPS})
GET_FILENAME_COMPONENT(_LIB_NAME ${_LIB} NAME_WE) GET_FILENAME_COMPONENT(_LIB_NAME ${_LIB} NAME_WE)
STRING(REGEX REPLACE "^lib" "" _NAME ${_LIB_NAME}) STRING(REGEX REPLACE "^lib" "" _NAME ${_LIB_NAME})
skipping to change at line 386 skipping to change at line 376
IF(MSVC) IF(MSVC)
SET_TARGET_PROPERTIES(${F} SET_TARGET_PROPERTIES(${F}
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT" PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
) )
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
OPTION(LARGE_FILE_TESTS "Run large file tests, which are slow and take lots of d isk." OFF) OPTION(LARGE_FILE_TESTS "Run large file tests, which are slow and take lots of d isk." OFF)
OPTION(BUILD_BENCHMARKS "Run F90 I/O Benchmarks" OFF) OPTION(BUILD_BENCHMARKS "Run F90 I/O Benchmarks" OFF)
OPTION(TEST_WITH_VALGRIND "Run extra tests with valgrind" OFF) OPTION(TEST_WITH_VALGRIND "Run extra tests with valgrind" OFF)
OPTION(TEST_PARALLEL "Run parallel I/O tests for F90 and F77" OFF) OPTION(ENABLE_PARALLEL_TESTS "Run parallel I/O tests for F90 and F77" OFF)
IF(TEST_PARALLEL)
SET(STATUS_PARALLEL ON) SET(TEST_PARALLEL OFF)
IF(ENABLE_PARALLEL_TESTS)
SET(TEST_PARALLEL ON)
ENDIF() ENDIF()
### ###
# Seek out dependent libraries. # Seek out netcdf library file and include path.
### ###
IF(NOT netCDF_LIBRARIES AND NOT netCDF_INCLUDE_DIR) IF(NOT NETCDF_C_LIBRARY)
FIND_PACKAGE(netCDF QUIET) FIND_LIBRARY(NETCDF_C_LIBRARY NAMES netcdf)
ELSE() IF(NOT NETCDF_C_LIBRARY)
SET(netCDF_FOUND TRUE) MESSAGE(FATAL_ERROR "libnetcdf not found.")
ENDIF()
ENDIF() ENDIF()
MESSAGE(STATUS "Found netcdf library: ${NETCDF_C_LIBRARY}")
IF (netCDF_FOUND) IF(NOT NETCDF_INCLUDE_DIR)
INCLUDE_DIRECTORIES(SYSTEM ${netCDF_INCLUDE_DIR}) FIND_PATH(NETCDF_INCLUDE_DIR NAMES netcdf.h)
SET(NETCDF_C_LIBRARY ${netCDF_LIBRARIES}) IF(NOT NETCDF_INCLUDE_DIR)
SET(NETCDF_C_INCLUDE_DIR ${netCDF_INCLUDE_DIR}) MESSAGE(FATAL_ERROR "netcdf.h not found.")
ENDIF()
ENDIF()
MESSAGE(STATUS "Found netcdf.h in ${NETCDF_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(SYSTEM ${NETCDF_INCLUDE_DIR})
###
# End 'Seek out netcdf library file and include path.'
###
###
# Check for various header files
###
CHECK_INCLUDE_FILE("alloca.h" HAVE_ALLOCA_H)
CHECK_INCLUDE_FILE("malloc.h" HAVE_MALLOC_H)
CHECK_INCLUDE_FILE("ctype.h" HAVE_CTYPE_H)
CHECK_INCLUDE_FILE("dirent.h" HAVE_DIRENT_H)
CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
CHECK_INCLUDE_FILE("getopt.h" HAVE_GETOPT_H)
CHECK_INCLUDE_FILE("stdbool.h" HAVE_STDBOOL_H)
CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H)
CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
CHECK_INCLUDE_FILE("stdio.h" HAVE_STDIO_H)
CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H)
CHECK_INCLUDE_FILE("stdarg.h" HAVE_STDARG_H)
CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H)
CHECK_INCLUDE_FILE("signal.h" HAVE_SIGNAL_H)
CHECK_INCLUDE_FILE("sys/dir.h" HAVE_SYS_DIR_H)
CHECK_INCLUDE_FILE("sys/ndir.h" HAVE_SYS_NDIR_H)
CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE("sys/wait.h" HAVE_SYS_WAIT_H)
CHECK_INCLUDE_FILE("sys/resource.h" HAVE_SYS_RESOURCE_H)
CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
CHECK_INCLUDE_FILE("pstdint.h" HAVE_PSTDINT_H)
CHECK_INCLUDE_FILE("endian.h" HAVE_ENDIAN_H)
CHECK_INCLUDE_FILE("BaseTsd.h" HAVE_BASETSD_H)
CHECK_INCLUDE_FILE("stddef.h" HAVE_STDDEF_H)
CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
CHECK_INCLUDE_FILE("netcdf.h" HAVE_NETCDF_H)
###
# End Check for various system header files.
###
###
# Type checks
###
CHECK_TYPE_SIZE("void*" SIZEOF_VOIDSTAR)
CHECK_TYPE_SIZE("char" SIZEOF_CHAR)
CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE)
CHECK_TYPE_SIZE("float" SIZEOF_FLOAT)
CHECK_TYPE_SIZE("int" SIZEOF_INT)
CHECK_TYPE_SIZE("long" SIZEOF_LONG)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
CHECK_TYPE_SIZE("off_t" SIZEOF_OFF_T)
CHECK_TYPE_SIZE("off64_t" SIZEOF_OFF64_T)
CHECK_TYPE_SIZE("short" SIZEOF_SHORT)
CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T)
CHECK_TYPE_SIZE("ssize_t" SIZEOF_SSIZE_T)
# __int64 is used on Windows for large file support.
CHECK_TYPE_SIZE("__int64" SIZEOF___INT_64)
CHECK_TYPE_SIZE("uchar" SIZEOF_UCHAR)
CHECK_TYPE_SIZE("int64_t" SIZEOF_INT64_T)
CHECK_TYPE_SIZE("uint64_t" SIZEOF_UINT64_T)
# On windows systems, we redefine off_t as __int64
# to enable LFS. This is true on 32 and 64 bit system.s
# We must redefine SIZEOF_OFF_T to match.
IF(MSVC AND SIZEOF___INT_64)
SET(SIZEOF_OFF_T ${SIZEOF___INT_64})
ENDIF()
IF(SIZEOF_SSIZE_T)
SET(HAVE_SSIZE_T 1)
ELSE() ELSE()
# netCDF not properly packaged. Try to find it manually. CHECK_TYPE_SIZE("SSIZE_T" SIZEOF_SSIZE_T)
FIND_LIBRARY(NETCDF_C_LIBRARY NAMES netcdf libnetcdf) IF(SIZEOF_SSIZE_T)
IF(NOT NETCDF_C_LIBRARY) SET(HAVE_SSIZE_T 1)
MESSAGE(FATAL_ERROR "libnetcdf not found. Please reinstall and try again.")
ELSE()
MESSAGE(STATUS "Found netcdf: ${NETCDF_C_LIBRARY}")
FIND_PATH(NC_H_INCLUDE_DIR "netcdf.h")
IF(NOT NC_H_INCLUDE_DIR)
MESSAGE(FATAL_ERROR "Directory containing netcdf.h cannot be found. Please
reinstall and try again.")
ELSE()
INCLUDE_DIRECTORIES(SYSTEM ${NC_H_INCLUDE_DIR})
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
### ###
# End 'seek out dependent libraries' # End type checks
### ###
### ###
# TODO: Replace these with automatically-determined # TODO: Replace these with automatically-determined
# checks, like in configure.ac. # checks, like in configure.ac.
### ###
CHECK_FUNCTION_EXISTS(alloca HAVE_ALLOCA)
CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nc_def_opaque "" USE_NETCDF4) CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nc_def_opaque "" USE_NETCDF4)
CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nccreate "" USE_NETCDF_V2) CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nccreate "" USE_NETCDF_V2)
CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nc_set_log_level "" USE_LOGGING) CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nc_set_log_level "" USE_LOGGING)
CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} oc_open "" BUILD_DAP) CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} oc_open "" BUILD_DAP)
CHECK_LIBRARY_EXISTS(${NETCDF_C_LIBRARY} nc_use_parallel_enabled "" BUILD_PARALL EL)
## IF(USE_NETCDF4)
# Set some status messages for the summary. SET(NC_BUILD_V4 TRUE)
## SET(HAVE_NC_DEF_OPAQUE TRUE)
ENDIF(USE_NETCDF4)
IF(USE_NETCDF_V2)
SET(HAVE_NCCREATE TRUE)
ENDIF(USE_NETCDF_V2)
SET(STATUS_LOGGING OFF) SET(STATUS_LOGGING OFF)
IF(USE_LOGGING) IF(USE_LOGGING)
SET(HAVE_NC_SET_LOG_LEVEL TRUE)
SET(STATUS_LOGGING ON) SET(STATUS_LOGGING ON)
ENDIF() ENDIF(USE_LOGGING)
SET(STATUS_PARALLEL OFF)
IF(BUILD_PARALLEL)
SET(STATUS_PARALLEL ON)
ENDIF()
SET(ENABLE_DAP OFF)
IF(BUILD_DAP) IF(BUILD_DAP)
SET(HAVE_OC_OPEN TRUE)
SET(ENABLE_DAP ON) SET(ENABLE_DAP ON)
ENDIF() ENDIF(BUILD_DAP)
##
# Set some status messages for the summary.
##
## ##
# End status messages/variables. # End status messages/variables.
## ##
SET(ENABLE_NETCDF4 OFF)
IF(USE_NETCDF4) IF(USE_NETCDF4)
SET(ENABLE_NETCDF4 ON) SET(ENABLE_NETCDF4 ON)
ADD_DEFINITIONS(-DUSE_NETCDF4) ADD_DEFINITIONS(-DUSE_NETCDF4)
SET(ENABLE_NETCDF_4 ON CACHE BOOL "")
SET(ENABLE_NETCDF4 ON CACHE BOOL "") SET(ENABLE_NETCDF4 ON CACHE BOOL "")
ENDIF() ENDIF()
IF (UNIX AND ${CMAKE_SIZEOF_VOID_P} MATCHES "8") IF (UNIX AND ${CMAKE_SIZEOF_VOID_P} MATCHES "8")
ADD_DEFINITIONS(-DLONGLONG_IS_LONG) ADD_DEFINITIONS(-DLONGLONG_IS_LONG)
# for easier debugging of cfortran.h # for easier debugging of cfortran.h
IF (APPLE) IF (APPLE)
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmacro-backtrace-limit=0") SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmacro-backtrace-limit=0")
endif () endif ()
ENDIF() ENDIF()
# Determine C library setting for NC_RELAX_COORD_BOUND
try_compile(NF_RELAX_COORD_BOUND ${CMAKE_CURRENT_BINARY_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/check_relax_coord_bound.c"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${NETCDF_INCLUDE_DIR}"
)
# Determine C library setting for NC_HAS_CDF5
try_compile(ENABLE_CDF5 ${CMAKE_CURRENT_BINARY_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/check_cdf5.c"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${NETCDF_INCLUDE_DIR}"
)
# Determine C library setting for NC_HAS_PNETCDF
try_compile(NF_HAS_PNETCDF ${CMAKE_CURRENT_BINARY_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/check_pnetcdf.c"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${NETCDF_INCLUDE_DIR}"
)
# Determine C library setting for NC_HAS_PARALLEL4
try_compile(NF_HAS_PARALLEL4 ${CMAKE_CURRENT_BINARY_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/check_parallel4.c"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${NETCDF_INCLUDE_DIR}"
)
IF(NF_HAS_PARALLEL4)
ADD_DEFINITIONS(-DNF_HAS_PARALLEL4)
ENDIF()
IF(NF_HAS_PNETCDF)
ADD_DEFINITIONS(-DNF_HAS_PNETCDF)
ENDIF()
IF(NF_HAS_PNETCDF OR NF_HAS_PARALLEL4)
SET(BUILD_PARALLEL ON)
SET(HAVE_NC_USE_PARALLEL_ENABLED TRUE)
ELSE(NF_HAS_PNETCDF OR NF_HAS_PARALLEL4)
SET(BUILD_PARALLEL OFF)
SET(HAVE_NC_USE_PARALLEL_ENABLED FALSE)
SET(TEST_PARALLEL OFF)
ENDIF(NF_HAS_PNETCDF OR NF_HAS_PARALLEL4)
# Determine C/Fortran pointer compatibility. # Determine C/Fortran pointer compatibility.
try_compile(COMPILE_SUCCESS ${CMAKE_CURRENT_BINARY_DIR} try_compile(COMPILE_SUCCESS ${CMAKE_CURRENT_BINARY_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/test_c_ptrdiff_t.f90" "${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/test_c_ptrdiff_t.f90"
) )
IF (COMPILE_SUCCESS) IF (COMPILE_SUCCESS)
ADD_DEFINITIONS(-DHAVE_TS29113_SUPPORT) ADD_DEFINITIONS(-DHAVE_TS29113_SUPPORT)
SET(HAVE_TS29113_SUPPORT TRUE)
ELSE () ELSE ()
# If the compile fails, PTRDIFF_T is not defined. # If the compile fails, PTRDIFF_T is not defined.
# Get sizeof of ptrdiff_t. # Get sizeof of ptrdiff_t.
SET(EXEC_NAME "${CMAKE_CURRENT_BINARY_DIR}/sizeof_ptrdiff_t") SET(EXEC_NAME "${CMAKE_CURRENT_BINARY_DIR}/sizeof_ptrdiff_t")
try_compile(COMPILE_SUCCESS2 ${CMAKE_CURRENT_BINARY_DIR} try_compile(COMPILE_SUCCESS2 ${CMAKE_CURRENT_BINARY_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/sizeof_ptrdiff_t.c" "${CMAKE_CURRENT_SOURCE_DIR}/CMakeExtras/sizeof_ptrdiff_t.c"
COPY_FILE ${EXEC_NAME} COPY_FILE ${EXEC_NAME}
) )
IF (COMPILE_SUCCESS2) IF (COMPILE_SUCCESS2)
EXECUTE_PROCESS( EXECUTE_PROCESS(
skipping to change at line 506 skipping to change at line 619
ADD_DEFINITIONS(-DSIZEOF_PTRDIFF_T=${SIZEOF_PTRDIFF_T}) ADD_DEFINITIONS(-DSIZEOF_PTRDIFF_T=${SIZEOF_PTRDIFF_T})
ENDIF (SIZEOF_RESULT) ENDIF (SIZEOF_RESULT)
ELSE() ELSE()
MESSAGE(FATAL_ERROR "Unable to compile ptrdiff") MESSAGE(FATAL_ERROR "Unable to compile ptrdiff")
ENDIF() ENDIF()
endif() endif()
IF(USE_NETCDF_V2) IF(USE_NETCDF_V2)
SET(BUILD_V2 ON CACHE BOOL "") SET(BUILD_V2 ON CACHE BOOL "")
ENDIF() ENDIF()
# Turn this on by default when it's working
OPTION(ENABLE_FORTRAN_TYPE_CHECKS OPTION(ENABLE_FORTRAN_TYPE_CHECKS
"Determine Fortran types corresponding to netCDF types" OFF) "Determine Fortran types corresponding to netCDF types" ON)
# Toggle whether or not to run tests. # Toggle whether or not to run tests.
OPTION(ENABLE_TESTS "Enable netcdf-fortran tests." ON) OPTION(ENABLE_TESTS "Enable netcdf-fortran tests." ON)
# Enable filter testing
OPTION(ENABLE_FILTER_TEST "Enable filter test." OFF)
# Set the default fortran builds; default is to build f03 # Set the default fortran builds; default is to build f03
SET(BUILD_F90 "ON") SET(BUILD_F90 "ON")
SET(BUILD_V2 "ON") SET(BUILD_V2 "ON")
SET(BUILD_F03 "OFF") SET(BUILD_F03 "OFF")
IF(ENABLE_FORTRAN_TYPE_CHECKS) IF(ENABLE_FORTRAN_TYPE_CHECKS)
# Do tests to determine which Fortran types correspond to NCBYTE, NCSHORT, ... # Do tests to determine which Fortran types correspond to NCBYTE, NCSHORT, ...
# The configure file got these by testing an F77 program, invoking # The configure file got these by testing an F77 program, invoking
# UD_FORTRAN_TYPES defined in acinclude.m4. TODO: check the types # UD_FORTRAN_TYPES defined in acinclude.m4.
# from the test program instead of assuming these defaults.
INCLUDE(CMakeExtras/MatchNetCDFFortranTypes.cmake)
ELSE() ELSE()
# Set Fortran types to default. # Set Fortran types to default.
SET(NCBYTE_T "byte") SET(NCBYTE_T "byte")
SET(NCBYTE_T "byte") SET(NCBYTE_T "byte")
SET(NCSHORT_T "integer*2") SET(NCSHORT_T "integer*2")
SET(NF_INT1_T "byte") SET(NF_INT1_T "byte")
SET(NF_INT2_T "integer*2") SET(NF_INT2_T "integer*2")
# Default is for following to be true. TODO: test instead # Default is for following to be true. TODO: test instead
SET(NF_INT1_IS_C_SIGNED_CHAR "1") SET(NF_INT1_IS_C_SIGNED_CHAR "1")
SET(NF_INT2_IS_C_SHORT "1") SET(NF_INT2_IS_C_SHORT "1")
skipping to change at line 592 skipping to change at line 709
## ##
# End configuration for post-install RPath # End configuration for post-install RPath
## ##
### ###
# Test-related options # Test-related options
### ###
# Set CDash-related options. # Set CDash-related options.
SET(NC4F_CTEST_DROP_SITE "my.cdash.org" CACHE STRING "Dashboard location for CTe #SET(NC4F_CTEST_DROP_SITE "my.cdash.org" CACHE STRING "Dashboard location for CT
st-based testing purposes.") est-based testing purposes.")
SET(NC4F_CTEST_DROP_SITE "cdash.unidata.ucar.edu" CACHE STRING "Dashboard locati
on for CTest-based testing purposes.")
SET(NC4F_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.") SET(NC4F_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.")
# Generate CTestConfig file from template. # Generate CTestConfig file from template.
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/CTestConfig.cmake.in" CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/CTestConfig.cmake.in"
"${CMAKE_SOURCE_DIR}/CTestConfig.cmake" "${CMAKE_SOURCE_DIR}/CTestConfig.cmake"
@ONLY) @ONLY)
### ###
# Allow the user to specify libraries # Allow the user to specify libraries
# to link against, similar to automakes 'LIBS' variable. # to link against, similar to automakes 'LIBS' variable.
### ###
SET(NC_EXTRA_DEPS "" CACHE STRING "Additional libraries to link against.") SET(NC_EXTRA_DEPS "" CACHE STRING "Additional libraries to link against.")
IF(NC_EXTRA_DEPS) IF(NC_EXTRA_DEPS)
STRING(REPLACE " " ";" DEPS_LIST ${NC_EXTRA_DEPS}) STRING(REPLACE " " ";" DEPS_LIST ${NC_EXTRA_DEPS})
FOREACH(_DEP ${DEPS_LIST}) FOREACH(_DEP ${DEPS_LIST})
STRING(REGEX REPLACE "^-l" "" _LIB ${_DEP}) STRING(REGEX REPLACE "^-l" "" _LIB ${_DEP})
FIND_LIBRARY("${_LIB}_DEP" NAMES "${_LIB}" "lib${_LIB}") FIND_LIBRARY("${_LIB}_DEP" NAMES "${_LIB}" "lib${_LIB}")
MESSAGE(${${_LIB}_DEP}) # MESSAGE(${${_LIB}_DEP})
IF(NOT "${_LIB}_DEP") IF(${_LIB}_DEP STREQUAL "")
MESSAGE(FATAL_ERROR "Error finding ${_LIB}.") MESSAGE(FATAL_ERROR "Error finding ${_LIB}.")
ELSE() ELSE()
MESSAGE(STATUS "Found ${_LIB}: ${${_LIB}_DEP}") MESSAGE(STATUS "Found ${_LIB}: ${${_LIB}_DEP}")
ENDIF() ENDIF()
SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}") SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}")
ENDFOREACH() ENDFOREACH()
MESSAGE("Extra deps: ${EXTRA_DEPS}") MESSAGE("Extra deps: ${EXTRA_DEPS}")
LIST(REMOVE_DUPLICATES EXTRA_DEPS) LIST(REMOVE_DUPLICATES EXTRA_DEPS)
ENDIF() ENDIF()
### ###
# End user-specified dependent libraries. # End user-specified dependent libraries.
### ###
###
# Option to enable examples.
###
OPTION(BUILD_EXAMPLES "Enable compilation of examples." ON)
# Determine whether or not to generate documentation. # Determine whether or not to generate documentation.
OPTION(ENABLE_DOXYGEN "Enable generation of doxygen-based documentation." OFF) OPTION(ENABLE_DOXYGEN "Enable generation of doxygen-based documentation." OFF)
IF(ENABLE_DOXYGEN) IF(ENABLE_DOXYGEN)
IF(DOXYGEN_FOUND) IF(DOXYGEN_FOUND)
# Offer the option to build internal documentation. # Offer the option to build internal documentation.
OPTION(ENABLE_INTERNAL_DOCS "Build internal documentation. This is of intere st to developers only." OFF) OPTION(ENABLE_INTERNAL_DOCS "Build internal documentation. This is of intere st to developers only." OFF)
IF(ENABLE_INTERNAL_DOCS) IF(ENABLE_INTERNAL_DOCS)
SET(BUILD_INTERNAL_DOCS YES CACHE STRING "") SET(BUILD_INTERNAL_DOCS YES CACHE STRING "")
ELSE() ELSE()
SET(BUILD_INTERNAL_DOCS NO CACHE STRING "") SET(BUILD_INTERNAL_DOCS NO CACHE STRING "")
skipping to change at line 685 skipping to change at line 808
ADD_SUBDIRECTORY(fortran) ADD_SUBDIRECTORY(fortran)
ADD_SUBDIRECTORY(libsrc) ADD_SUBDIRECTORY(libsrc)
IF(ENABLE_TESTS) IF(ENABLE_TESTS)
ADD_SUBDIRECTORY(nf_test) ADD_SUBDIRECTORY(nf_test)
ADD_SUBDIRECTORY(nf03_test) ADD_SUBDIRECTORY(nf03_test)
ENDIF() ENDIF()
# Build the Fortran examples # Build the Fortran examples
ADD_SUBDIRECTORY(examples) IF(BUILD_EXAMPLES)
ADD_SUBDIRECTORY(examples)
ENDIF(BUILD_EXAMPLES)
ADD_SUBDIRECTORY(docs) ADD_SUBDIRECTORY(docs)
print_conf_summary() print_conf_summary()
 End of changes. 32 change blocks. 
73 lines changed or deleted 198 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)