mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[svn-r19116] Corrected positioning of cmake variables in definition order.
This commit is contained in:
parent
e3537b7ee7
commit
3e87f75822
@ -75,19 +75,6 @@ PROJECT (HDF5 C CXX)
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Basic HDF5 stuff here
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (HDF5_PACKAGE "hdf5")
|
||||
SET (HDF5_PACKAGE_NAME "HDF5")
|
||||
SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
|
||||
SET (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
|
||||
SET (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
|
||||
SET (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION}")
|
||||
SET (HDF5_PACKAGE_TARNAME "hdf5")
|
||||
SET (HDF5_PACKAGE_URL "http://www.hdfgroup.org")
|
||||
SET (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the core names of all the libraries
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -120,6 +107,22 @@ SET (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_TEST_LI
|
||||
SET (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_LIB_CORENAME}")
|
||||
SET (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_CORENAME}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the target names of all the libraries
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME})
|
||||
SET (HDF5_TEST_LIB_TARGET ${HDF5_TEST_LIB_CORENAME})
|
||||
SET (HDF5_CPP_LIB_TARGET ${HDF5_CPP_LIB_CORENAME})
|
||||
SET (HDF5_HL_LIB_TARGET ${HDF5_HL_LIB_CORENAME})
|
||||
SET (HDF5_HL_CPP_LIB_TARGET ${HDF5_HL_CPP_LIB_CORENAME})
|
||||
SET (HDF5_TOOLS_LIB_TARGET ${HDF5_TOOLS_LIB_CORENAME})
|
||||
SET (HDF5_F90_LIB_TARGET ${HDF5_F90_LIB_CORENAME})
|
||||
SET (HDF5_F90_C_LIB_TARGET ${HDF5_F90_C_LIB_CORENAME})
|
||||
SET (HDF5_F90_TEST_LIB_TARGET ${HDF5_F90_TEST_LIB_CORENAME})
|
||||
SET (HDF5_F90_C_TEST_LIB_TARGET ${HDF5_F90_C_TEST_LIB_CORENAME})
|
||||
SET (HDF5_HL_F90_LIB_TARGET ${HDF5_HL_F90_LIB_CORENAME})
|
||||
SET (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define some CMake variables for use later in the project
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -133,6 +136,31 @@ SET (HDF5_TOOLS_SOURCE_DIR ${HDF5_SOURCE_DIR}/tools)
|
||||
SET (HDF5_PERFORM_SOURCE_DIR ${HDF5_SOURCE_DIR}/perform)
|
||||
SET (HDF5_F90_SOURCE_DIR ${HDF5_SOURCE_DIR}/fortran)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# parse the full version number from H5public.h and include in H5_VERS_INFO
|
||||
#-----------------------------------------------------------------------------
|
||||
FILE (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents)
|
||||
STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_MAJOR[ \t]+([0-9]*).*$"
|
||||
"\\1" H5_VERS_MAJOR ${_h5public_h_contents})
|
||||
STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
|
||||
"\\1" H5_VERS_MINOR ${_h5public_h_contents})
|
||||
STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
|
||||
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
|
||||
#MESSAGE (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Basic HDF5 stuff here
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (HDF5_PACKAGE "hdf5")
|
||||
SET (HDF5_PACKAGE_NAME "HDF5")
|
||||
SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
|
||||
SET (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
|
||||
SET (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
|
||||
SET (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION}")
|
||||
SET (HDF5_PACKAGE_TARNAME "hdf5")
|
||||
SET (HDF5_PACKAGE_URL "http://www.hdfgroup.org")
|
||||
SET (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Include some macros for reusable code
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -238,22 +266,6 @@ IF (HDF5_ENABLE_COVERAGE)
|
||||
SET (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
|
||||
ENDIF (HDF5_ENABLE_COVERAGE)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the target names of all the libraries
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME})
|
||||
SET (HDF5_TEST_LIB_TARGET ${HDF5_TEST_LIB_CORENAME})
|
||||
SET (HDF5_CPP_LIB_TARGET ${HDF5_CPP_LIB_CORENAME})
|
||||
SET (HDF5_HL_LIB_TARGET ${HDF5_HL_LIB_CORENAME})
|
||||
SET (HDF5_HL_CPP_LIB_TARGET ${HDF5_HL_CPP_LIB_CORENAME})
|
||||
SET (HDF5_TOOLS_LIB_TARGET ${HDF5_TOOLS_LIB_CORENAME})
|
||||
SET (HDF5_F90_LIB_TARGET ${HDF5_F90_LIB_CORENAME})
|
||||
SET (HDF5_F90_C_LIB_TARGET ${HDF5_F90_C_LIB_CORENAME})
|
||||
SET (HDF5_F90_TEST_LIB_TARGET ${HDF5_F90_TEST_LIB_CORENAME})
|
||||
SET (HDF5_F90_C_TEST_LIB_TARGET ${HDF5_F90_C_TEST_LIB_CORENAME})
|
||||
SET (HDF5_HL_F90_LIB_TARGET ${HDF5_HL_F90_LIB_CORENAME})
|
||||
SET (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# When building utility executables that generate other (source) files :
|
||||
# we make use of the following variables defined in the root CMakeLists.
|
||||
@ -342,18 +354,6 @@ IF (CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
|
||||
ENDIF (CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# parse the full version number from H5public.h and include in H5_VERS_INFO
|
||||
#-----------------------------------------------------------------------------
|
||||
FILE (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents)
|
||||
STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_MAJOR[ \t]+([0-9]*).*$"
|
||||
"\\1" H5_VERS_MAJOR ${_h5public_h_contents})
|
||||
STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
|
||||
"\\1" H5_VERS_MINOR ${_h5public_h_contents})
|
||||
STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
|
||||
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
|
||||
#MESSAGE (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# All libs/tests/examples need the main include directories
|
||||
#-----------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user