mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
More cmake fixes
This commit is contained in:
parent
3a1217577c
commit
09d407c106
@ -751,12 +751,6 @@ IF(NOT WIN32)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
OPTION(ENABLE_PROPERTIES_ATTRIBUTE "Enable properties attribute." ON)
|
||||
IF(ENABLE_PROPERTIES_ATTRIBUTE)
|
||||
SET(ENABLE_PROPATTR ON CACHE BOOL "")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Option to Enable DAP long tests, remote tests.
|
||||
OPTION(ENABLE_DAP_LONG_TESTS "Enable DAP long tests." OFF)
|
||||
OPTION(ENABLE_DAP_REMOTE_TESTS "Enable DAP remote tests." ON)
|
||||
|
17
cf.cmake
17
cf.cmake
@ -1,3 +1,7 @@
|
||||
# Is netcdf-4 and/or DAP enabled?
|
||||
#NC4=1
|
||||
#DAP=1
|
||||
|
||||
# Is visual studio being used?
|
||||
#VS=yes
|
||||
CYGWIN=yes
|
||||
@ -39,13 +43,22 @@ fi
|
||||
#if test "x$VS" != x ; then USR=c:/cygwin/usr; else USR=/usr; fi
|
||||
|
||||
ZLIB="-DZLIB_LIBRARY=${ZP}/$ZLIB -DZLIB_INCLUDE_DIR=${ZP}/include -DZLIB_INCLUDE_DIRS=${ZP}/include"
|
||||
if test "x$NC4" = x1 ; then
|
||||
HDF5="-DHDF5_LIB=${HP}/$H5LIB -DHDF5_HL_LIB=${HP}/$H5LIB_HL -DHDF5_INCLUDE_DIR=${HP}/include"
|
||||
fi
|
||||
if test "x$DAP" = x1 ; then
|
||||
CURL="-DCURL_LIBRARY=${CP}/$CURLLIB -DCURL_INCLUDE_DIR=${CP}/include -DCURL_INCLUDE_DIRS=${CP}/include"
|
||||
fi
|
||||
|
||||
#FLAGS="$FLAGS -DCMAKE_C_FLAGS='-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter'"x2
|
||||
|
||||
#FLAGS="$FLAGS -DENABLE_DAP=false"
|
||||
#FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
|
||||
if test "x$DAP" = x ; then
|
||||
FLAGS="$FLAGS -DENABLE_DAP=false"
|
||||
fi
|
||||
if test "x$NC4" = x ; then
|
||||
FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
|
||||
fi
|
||||
FLAGS="$FLAGS -DENABLE_CONVERSION_WARNINGS=false"
|
||||
|
||||
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=$USR/local"
|
||||
#FLAGS="-DCMAKE_PREFIX_PATH=$PPATH"
|
||||
|
@ -46,7 +46,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
|
||||
*/
|
||||
/* #define SELF_TEST 1 */
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h> /* defines printf for tests */
|
||||
#include <time.h> /* defines time_t for timings in the test */
|
||||
#ifndef HAVE_STDINT_H
|
||||
|
@ -59,7 +59,7 @@ IF(ENABLE_TESTS)
|
||||
TARGET_LINK_LIBRARIES(bom netcdf)
|
||||
TARGET_LINK_LIBRARIES(tst_dimsizes netcdf)
|
||||
|
||||
IF(ENABLE_PROPERTIES_ATTRIBUTE)
|
||||
IF(ENABLE_FILEINFO)
|
||||
ADD_EXECUTABLE(tst_fileinfo tst_fileinfo.c)
|
||||
TARGET_LINK_LIBRARIES(tst_fileinfo netcdf)
|
||||
add_sh_test(ncdump tst_fileinfo)
|
||||
|
Loading…
Reference in New Issue
Block a user