From 09d407c1065fbe8d57059f48397ed21befaf0a49 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Fri, 6 May 2016 16:30:40 -0600 Subject: [PATCH] More cmake fixes --- CMakeLists.txt | 6 ------ cf.cmake | 17 +++++++++++++++-- libsrc/lookup3.c | 2 +- ncdump/CMakeLists.txt | 2 +- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43ad17c44..ad8554a41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cf.cmake b/cf.cmake index 2e4c463f9..b74021a26 100644 --- a/cf.cmake +++ b/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" diff --git a/libsrc/lookup3.c b/libsrc/lookup3.c index b970567a0..4464153ec 100644 --- a/libsrc/lookup3.c +++ b/libsrc/lookup3.c @@ -46,7 +46,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy. */ /* #define SELF_TEST 1 */ -#include +#include "config.h" #include /* defines printf for tests */ #include /* defines time_t for timings in the test */ #ifndef HAVE_STDINT_H diff --git a/ncdump/CMakeLists.txt b/ncdump/CMakeLists.txt index ac3d85452..fb96ee428 100644 --- a/ncdump/CMakeLists.txt +++ b/ncdump/CMakeLists.txt @@ -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)