summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
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 /CMakeLists.txt
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 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)