I noticed that the SZIP section is coded differently from the ZLIB section.
The SZIP section doesn't recognize the prebuilt library stuff.  Is this a
feature or a bug?

In the SZIP section of CMakeFilters.cmake, I commented out a bunch of lines,
as listed.  But now the build complains that there is a macro missing.  The
coder for this section has some other dependencies and therefore decided to
not make use of the prebuilt binary, which the zip lib section does?

On the other hand, if I didn't have prebuilt SZIP, I still have problems
with SZIP being built automatically.  What is the magic to make that happen
in a Windows Visual Studio environment?

===  The macro message:
Make Error: The following variables are used in this project, but they are
set to NOTFOUND.
lease set them or make sure they are set and tested correctly in the CMake
files:
ZIP_INCLUDE_DIR (ADVANCED)
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/c++/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/lib
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5diff
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5ls
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/misc
.....

=== The commented lines in CMakeFilters.cmake
#---------------------------------------------------------------------------
--
# Option for SzLib support
#---------------------------------------------------------------------------
--
OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
IF (HDF5_ENABLE_SZIP_SUPPORT)
  OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
#  IF (NOT SZIP_USE_EXTERNAL)
#    FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
#    IF (NOT SZIP_FOUND)
#      FIND_PACKAGE (SZIP) # Legacy find
#    ENDIF (NOT SZIP_FOUND)
#  ENDIF (NOT SZIP_USE_EXTERNAL)
#  IF (SZIP_FOUND)
    SET (H5_HAVE_FILTER_SZIP 1)
    SET (H5_HAVE_SZLIB_H 1)
    SET (H5_HAVE_LIBSZ 1)
    SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
    SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
#  ELSE (SZIP_FOUND)
#    IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
#      EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}
${HDF5_ENABLE_SZIP_ENCODING})
#      SET (H5_HAVE_FILTER_SZIP 1)
#      SET (H5_HAVE_SZLIB_H 1)
#      SET (H5_HAVE_LIBSZ 1)
      MESSAGE (STATUS "Filter SZIP is built")
#    ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
#      MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
#    ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
#  ENDIF (SZIP_FOUND)
  SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
  INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR})
  MESSAGE (STATUS "Filter SZIP is ON")
  IF (H5_HAVE_FILTER_SZIP)
    SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
  ENDIF (H5_HAVE_FILTER_SZIP)
  IF (HDF5_ENABLE_SZIP_ENCODING)
    SET (H5_HAVE_SZIP_ENCODER 1)
    SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
  ENDIF (HDF5_ENABLE_SZIP_ENCODING)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT)

-----Original Message-----
From: Allen Byrne [mailto:[email protected]] 
Sent: Wednesday, November 20, 2013 10:34
To: [email protected]
Cc: Raymond Burkholder
Subject: Re: [Hdf-forum] Issues with Building 1.9.168 on Windows.

Raymond,

   You have it almost correct!  It found zlib but did not find szip (see the

**** lines and notice the difference).  The libraries are first searched for
a 
CMake -built version before looking for the old-style versions. If it
doesn't 
find the CMake built it issues a warning, then does another find_package
call 
using the old find{lib}.cmake module included with CMake.

Double check the names of the lib and be sure they match the paths you 
specified. Also double-check the find_package.cmake module for further
clues.

Allen


On Tuesday, November 19, 2013 04:32:53 PM Raymond Burkholder wrote:
> I have downloaded and have already built szip and zlib in alternate
> directories.  They are built as static libraries.  I then use the special
-D
> options to define the lib and include files.  When using the following
> command:
> 
> D:\Data\Projects\VC++\hdf5-1.9.168\build>cmake -C cacheinit.cmake -G
"Visual
> Studio 11 Win64" ..
>   -D"ZLIB_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\zlib-1.2.8"
> 
>
-D"ZLIB_LIBRARY:FILEPATH="D:\Data\Projects\VC++\zlib-1.2.8\contrib\vstudio\v
> c11\x64\ZlibStatRelease\zlibstat.lib"
>   -D"SZIP_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\szip-2.1\src"
> 
>
-D"SZIP_LIBRARY:FILEPATH=D:\Data\Projects\VC++\szip-2.1\windows\static\lib\x
> 64\Release\libszip.lib"
> 
> When I execute the above command, Cmake does it environment evaluation,
and
> then ends up with the messages below.
> 
> I don't want the  make build to do the szip/zlib builds, they are already
> done, I want the libs to be used which I've already manually built.  And I
> want HDF5 C and C++ libraries built as statically linked libraries.  What
> changes do I require to make that happen?
> 
> After the messages below, I have included the content of my
cacheinit.cmake
> file.
> 
> ===========================================================
> << a bunch of lines cut from the listing, followed by... >>
> 
> -- Checking IF your system generates wrong code for log2 routine... no
> -- Checking IF alignment restrictions are strictly enforced... yes
> CMake Warning at CMakeFilters.cmake:46 (FIND_PACKAGE):
>   Could not find a package configuration file provided by "ZLIB" with any
of
> the following names:
> 
>     zlibConfig.cmake
>     zlib-config.cmake
> 
>   Add the installation prefix of "ZLIB" to CMAKE_PREFIX_PATH or set
>   "ZLIB_DIR" to a directory containing one of the above files.  If "ZLIB"
>   provides a separate development package or SDK, be sure it has been
>   installed.
> Call Stack (most recent call first):
>   CMakeLists.txt:692 (INCLUDE)
> 
>
*************************************************** 
> -- Found ZLIB:
>
D:/Data/Projects/VC++/zlib-1.2.8/contrib/vstudio/vc11/x64/ZlibStatRelease/zl
> ibstat.lib -DSZIP_INCLUDE_DIR:PATH=D:/Data/Projects/VC
> ++/szip-2.1/src
>
-DSZIP_LIBRARY:FILEPATH=D:/Data/Projects/VC++/szip-2.1/windows/static/lib/x6
> 4/Release/libszip.lib (found version "1.2.8")
> -- Filter ZLIB is ON
****************************************************
> CMake Warning at CMakeFilters.cmake:90 (FIND_PACKAGE):
>   Could not find a package configuration file provided by "SZIP" with any
of
> the following names:
> 
>     szipConfig.cmake
>     szip-config.cmake
> 
>   Add the installation prefix of "SZIP" to CMAKE_PREFIX_PATH or set
>   "SZIP_DIR" to a directory containing one of the above files.  If "SZIP"
>   provides a separate development package or SDK, be sure it has been
>   installed.
> Call Stack (most recent call first):
>   CMakeLists.txt:692 (INCLUDE)
> 
>
***************************************************** 
> -- SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set
> or set the SZIP_INSTALL environment variable.
> CMake Error at CMakeFilters.cmake:109 (MESSAGE):
>   SZIP is Required for SZIP support in HDF5
> Call Stack (most recent call first):
>   CMakeLists.txt:692 (INCLUDE)
*****************************************************
> 
> 
> -- Configuring incomplete, errors occurred!
> See also
> "D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeOutput.log".
> See also
> "D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeError.log".
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to