summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 828f089..5b9c2a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -170,6 +170,8 @@ 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})
+STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z.]*)\".*$"
+ "\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents})
#MESSAGE (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
#-----------------------------------------------------------------------------
@@ -437,6 +439,19 @@ IF (CMAKE_COMPILER_IS_GNUCXX)
ENDIF (CMAKE_COMPILER_IS_GNUCXX)
#-----------------------------------------------------------------------------
+# Use gcc visibility flag.
+#-----------------------------------------------------------------------------
+OPTION (HDF5_ENABLE_VISIBILITY "Enable gcc4 visibility=hidden for Libraries and Programs" OFF)
+IF (HDF5_ENABLE_VISIBILITY)
+ IF (CMAKE_COMPILER_IS_GNUCC)
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
+ ENDIF (CMAKE_COMPILER_IS_GNUCC)
+ IF (CMAKE_COMPILER_IS_GNUCXX)
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+ ENDIF (CMAKE_COMPILER_IS_GNUCXX)
+ENDIF (HDF5_ENABLE_VISIBILITY)
+
+#-----------------------------------------------------------------------------
# All libs/tests/examples need the main include directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR})