mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-12 18:10:24 +08:00
Forgot to check cmake build
This commit is contained in:
parent
d15f277252
commit
5e4cbd2fec
16
cf.cmake
16
cf.cmake
@ -2,23 +2,27 @@ rm -fr build
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
export CC=mpicc
|
||||
#export CC=mpicc
|
||||
export CC=gcc
|
||||
|
||||
for p in /usr/local/lib /usr/lib ; do
|
||||
if test -z "$ZP" -a -f $p/libz.so ; then ZP=$p; fi
|
||||
if test -z "$HP" -a -f $p/libhdf5.so ; then HP=$p; fi
|
||||
if test -z "$CP" -a -f $p/libcurl.so ; then CP=$p; fi
|
||||
if test -f $p/libz.so ; then ZP=$p; fi
|
||||
if test -f $p/libhdf5.so ; then HP=$p; fi
|
||||
if test -f $p/libcurl.so ; then CP=$p; fi
|
||||
done
|
||||
|
||||
|
||||
ZLIB="-DZLIB_LIBRARY=${ZP}/libz.so -DZLIB_INCLUDE_DIR=${ZP}/include -DZLIB_INCLUDE_DIRS=${ZP}/include"
|
||||
HDF5="-DHDF5_LIB=${HP}/libhdf5.so -DHDF5_HL_LIB=${HP}/libhdf5_hl.so -DHDF5_INCLUDE_DIR=${HP}/include"
|
||||
CURL="-DCURL_LIBRARY=${CP}/libcurl.so -DCURL_INCLUDE_DIR=${CP}/include -DCURL_INCLUDE_DIRS=${CP}/include"
|
||||
|
||||
FLAGS="$FLAGS -DENABLE_DAP=false"
|
||||
FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
|
||||
|
||||
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=/usr/local"
|
||||
#FLAGS="-DCMAKE_PREFIX_PATH=$PPATH"
|
||||
#FLAGS="$FLAGS -DCMAKE_PREFIX_PATH=$PPATH"
|
||||
FLAGS="$FLAGS -DENABLE_DAP_REMOTE_TESTS=true"
|
||||
FLAGS="$FLAGS -DENABLE_DAP_AUTH_TESTS=true"
|
||||
#FLAGS="$FLAGS -DENABLE_DAP_AUTH_TESTS=true"
|
||||
|
||||
cmake $FLAGS ${ZLIB} ${HDF5} ${CURL} ..
|
||||
cmake --build .
|
||||
|
@ -54,8 +54,10 @@ ENDIF()
|
||||
IF(ENABLE_TESTS)
|
||||
ADD_EXECUTABLE(rewrite-scalar rewrite-scalar.c)
|
||||
ADD_EXECUTABLE(bom bom.c)
|
||||
ADD_EXECUTABLE(tst_dimsizes tst_dimsizes.c)
|
||||
TARGET_LINK_LIBRARIES(rewrite-scalar netcdf)
|
||||
TARGET_LINK_LIBRARIES(bom netcdf)
|
||||
TARGET_LINK_LIBRARIES(tst_dimsizes netcdf)
|
||||
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(rewrite-scalar PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
@ -71,6 +73,13 @@ IF(MSVC)
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(bom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET_TARGET_PROPERTIES(tst_dimsizes PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
ENDIF()
|
||||
|
||||
# Base tests
|
||||
@ -96,10 +105,9 @@ ENDIF()
|
||||
add_sh_test(ncdump tst_nccopy3)
|
||||
add_sh_test(ncdump tst_charfill)
|
||||
|
||||
|
||||
|
||||
add_sh_test(ncdump tst_formatx3)
|
||||
add_sh_test(ncdump tst_bom)
|
||||
add_bin_test(ncdump tst_dimsizes)
|
||||
|
||||
# The following test script invokes
|
||||
# gcc directly.
|
||||
|
Loading…
x
Reference in New Issue
Block a user