Skip to content

Commit

Permalink
cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed May 22, 2016
1 parent f9010f5 commit c7a1343
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
34 changes: 11 additions & 23 deletions recipes/libnetcdf/build.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
#!/bin/bash

if [[ $(uname) == Darwin ]]; then
export LIBRARY_SEARCH_VAR=DYLD_FALLBACK_LIBRARY_PATH
else
export LIBRARY_SEARCH_VAR=LD_LIBRARY_PATH
fi

export LDFLAGS="-L$PREFIX/lib $LDFLAGS"
export CFLAGS="-I$PREFIX/include $CFLAGS"
export CPPFLAGS="-I$PREFIX/include $CPPFLAGS"

./configure --prefix=$PREFIX \
--enable-shared \
--enable-static \
--enable-extra-example-tests \
--disable-doxygen \
--enable-netcdf-4 \
--enable-ncgen4 \
--enable-dap \
--enable-hdf4
cmake -D CMAKE_INSTALL_PREFIX=$PREFIX \
-D CMAKE_INSTALL_LIBDIR:PATH=$PREFIX/lib \
-D ENABLE_DAP=ON \
-D ENABLE_HDF4=ON \
-D ENABLE_NETCDF_4=ON \
-D BUILD_SHARED_LIBS=ON \
-D ENABLE_TESTS=ON \
-D BUILD_UTILITIES=ON \
-D ENABLE_DOXYGEN=OFF \
$SRC_DIR

make
# https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11423.html
eval ${LIBRARY_SEARCH_VAR}=$PREFIX/lib make check || { cat ncdump/test-suite.log; exit 1; }
ctest
make install

rm -rf $PREFIX/share
3 changes: 1 addition & 2 deletions recipes/libnetcdf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ build:
requirements:
build:
- python # [win]
- m4 # [unix]
- cmake
- pkg-config # [unix]
- msinttypes # [win]
- cmake # [win]
- curl
- zlib 1.2*
- hdf4
Expand Down

0 comments on commit c7a1343

Please sign in to comment.