Re: [netcdfgroup] netCDF 4.3 Release Candidate available --- CMake build in Windows

  • To: "Ward Fisher" <wfisher@xxxxxxxxxxxxxxxx>
  • Subject: Re: [netcdfgroup] netCDF 4.3 Release Candidate available --- CMake build in Windows
  • From: "Pedro Vicente" <pvicente@xxxxxxx>
  • Date: Mon, 18 Mar 2013 03:16:17 -0700
Hi Ward

If your hdf5 libraries are installed in W:\hdf5_install, for example, you would specify the following argument:

-DCMAKE_PREFIX_PATH=W:\hdf5_install


The way I make Visual Studio be aware of libraries/headers is by means of Windows environment variables
for example

$HEADER_HDF5
Is defined for me  as
T:\hdf5\hdf5\src
and
$LIB_HDF5
as
T:\hdf5\hdf5\proj\hdf5\Debug\hdf5d.lib

1) Is it possible to do this with the supplied CMake projects, point to environment variables instead of an install path ?

My HDF5 header/libs are always "development" locations, that I use for debugging, not pre built binary distributions.


2) I did try a pre built binary distribution for this case, the latest HDF5 built with CMake from here, this one


http://www.hdfgroup.org/HDF5/release/obtain5.html#bin

Windows (64-bit)
 Compilers:
   CMake VS 2010 C, C++, IVF 12

3) Following the instructions (this is for RC3) in "COMPILE_CMake.txt"

"
The CMake build system discourages 'in-source' builds. Instead, a
build directory is created and used to contain the output of the build
process. From the command line, this may be achieved as follows:

developer@dummy-machine:/netcdf$ mkdir build_dir
developer@dummy-machine:/netcdf$ cd build_dir
developer@dummy-machine:/netcdf/build_dir$ cmake ..
"

I did just that with these arguments , -DCMAKE_PREFIX_PATH=T:\hdf5_install_1.8.10 is the location of the pre-built binaries I downloaded from the HDF site, that contains some CMake information


W:\netcdf-4.3.0-rc3\build_dir>cmake . -DCMAKE_INSTALL_PREFIX=W:\netcdf_install -DCMAKE_PREFIX_PATH=T:\hdf5_install_1.8.10


I get these messages


-- Building for: Visual Studio 10
-- The C compiler identification is MSVC 16.0.40219.1
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
CMake Error at cmake/modules/windows/FindHDF5.cmake:83 (INCLUDE):
 include could not find load file:

   HDF5_ROOT_DIR-NOTFOUND/hdf5-config.cmake
Call Stack (most recent call first):
 CMakeLists.txt:75 (INCLUDE)


-- T:/hdf5_install_1.8.10/lib/hdf5dll.lib, T:/hdf5_install_1.8.10/lib/hdf5_hldll.lib, T:/hdf5_install_1.8.10/include
-- Found ZLIB: T:/hdf5_install_1.8.10/lib/zlib.lib (found version "1.2.7")
-- Could NOT find CURL (missing:  CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:417 (MESSAGE):
 DAP Support specified, CURL libraries are not found.


-- Configuring incomplete, errors occurred!


Thanks



------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/


----- Original Message ----- From: "Ward Fisher" <wfisher@xxxxxxxxxxxxxxxx>
To: "Pedro Vicente" <pvicente@xxxxxxx>
Cc: <netcdfgroup@xxxxxxxxxxxxxxxx>
Sent: Friday, March 15, 2013 8:36 AM
Subject: Re: [netcdfgroup] netCDF 4.3 Release Candidate available --- CMake build in Windows


Hi Pedro,

If your hdf5 libraries are installed in W:\hdf5_install, for example, you would specify the following argument:

-DCMAKE_PREFIX_PATH=W:\hdf5_install

CMake would then check this location first when looking for any header and library files. The netCDF build will use the zlib library included with the hdf5 binary distribution. If you do not have this, or if it is installed elsewhere, you can specify multiple search locations thusly:

-DCMAKE_PREFIX_PATH="W:\hdf5_install;W:\zlib_install".

I hope this helps!

-Ward

On 3/14/13 7:04 PM, Pedro Vicente wrote:
Hi Ward

I tried to build in Windows with CMake, using


cmake -DCMAKE_INSTALL_PREFIX=W:\netcdf_install

I get these messages


-- Building for: Visual Studio 10
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- HDF5_LIB-NOTFOUND, HDF5_HL_LIB-NOTFOUND, HDF5_INCLUDE_DIR-NOTFOUND
-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Error at CMakeLists.txt:403 (MESSAGE):
 HDF5 Support specified, cannot find ZLib.


CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files:
HDF5_INCLUDE_DIR
  used as include directory in directory W:/netcdf_svn
  used as include directory in directory W:/netcdf_svn
  used as include directory in directory W:/netcdf_svn
  used as include directory in directory W:/netcdf_svn

-- Configuring incomplete, errors occurred!


How can I make the supplied CMake projects to detect my HDF5 and zlib locations?

Thanks

Pedro


------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/


----- Original Message ----- From: "Ward Fisher" <wfisher@xxxxxxxxxxxxxxxx>
To: <netcdfgroup@xxxxxxxxxxxxxxxx>
Sent: Tuesday, February 26, 2013 5:04 PM
Subject: [netcdfgroup] netCDF 4.3 Release Candidate available


Good afternoon all,

We are officially announcing the availability of the netCDF-C libraries version 4.3.0, release candidate 2.

Documentation and source downloads are available at:

http://www.unidata.ucar.edu/downloads/netcdf/netcdf-rc/index.jsp

Pre-built Windows binaries are available at:

http://www.unidata.ucar.edu/software/netcdf/docs_rc/winbin.html

The previous Windows-specific website, http://www.unidata.ucar.edu/netcdf/win_netcdf/ will redirect to this new location. Please note that these pre-built libraries (both 32 & 64-bit) are built and tested on 64-bit Windows 7 using Visual Studio 10.

Highlights of the 4.3 release include:

o Many bug fixes.
o Improved DAP support.
o Improved parallel-netcdf support.
o Improved Windows support.
o Integration of CMake, allow for Visual-Studio based builds.

This release candidate is the precursor to either a new release candidate, or the final 4.3.0 release (depending on the number and severity of bugs reported). As always, we welcome any bug reports and/or feedback!

Have a great evening,

-Ward
Ward Fisher
wfisher@xxxxxxxxxxxxxxxx

_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/






  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: