summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-09-26 13:56:42 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-09-26 13:56:42 (GMT)
commitcb06ebf08d957fec0cbad773e7e2353c66f03dbf (patch)
tree8c0b8c80038ac892b12e4669158d517deca1930e
parentc27e3c313e1ec66fc88971d9030dd4a51fbf35c0 (diff)
downloadhdf5-cb06ebf08d957fec0cbad773e7e2353c66f03dbf.zip
hdf5-cb06ebf08d957fec0cbad773e7e2353c66f03dbf.tar.gz
hdf5-cb06ebf08d957fec0cbad773e7e2353c66f03dbf.tar.bz2
[svn-r21417] Correct indentation in cmake config file.
Add option for allowing -fPIC.
-rw-r--r--CMakeLists.txt11
-rw-r--r--config/cmake/hdf5-config.cmake.install.in2
2 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e5f8bf..d7209ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -281,6 +281,17 @@ IF (BUILD_STATIC_EXECS)
ENDIF (BUILD_STATIC_EXECS)
#-----------------------------------------------------------------------------
+# Option to Build Static PIC
+#-----------------------------------------------------------------------------
+OPTION (BUILD_STATIC_PIC "Build Static PIC" OFF)
+IF (BUILD_STATIC_PIC)
+ IF (NOT WIN32)
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ ENDIF (NOT WIN32)
+ENDIF (BUILD_STATIC_PIC)
+
+#-----------------------------------------------------------------------------
# Option to use code coverage
#-----------------------------------------------------------------------------
OPTION (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in
index 610841c..268d5ed 100644
--- a/config/cmake/hdf5-config.cmake.install.in
+++ b/config/cmake/hdf5-config.cmake.install.in
@@ -19,7 +19,7 @@ SET (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
SET (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
SET (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
SET (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-SET (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
+SET (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
#-----------------------------------------------------------------------------
# Directories