Added support for netcdf c++ 4.2

This commit is contained in:
Guilhem Lavaux 2012-09-15 18:53:47 -04:00
parent 0afe7b7eab
commit 26a2e15cbe
3 changed files with 15 additions and 2 deletions

View file

@ -46,7 +46,7 @@ SET(CosmoTool_SRCS ${CosmoTool_SRCS}
growthFactor.hpp
)
include_directories(${GSL_INCLUDE_PATH} ${NETCDF_INCLUDE_PATH})
include_directories(${GSL_INCLUDE_PATH} ${NETCDF_INCLUDE_PATH} ${NETCDFCPP_INCLUDE_PATH} ${CMAKE_BINARY_DIR}/src)
set(CosmoTool_LIBS ${NETCDF_LIBRARY} ${NETCDFCPP_LIBRARY} ${GSL_LIBRARIES})
if (HDF5_FOUND)

View file

@ -1,5 +1,11 @@
#include "ctool_netcdf_ver.hpp"
#include "config.hpp"
#ifdef NETCDFCPP4
#include <netcdf>
using namespace netCDF
#else
#include <netcdfcpp.h>
#endif
#include <fstream>
#include "yorick.hpp"
#include <assert.h>