summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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 b5685cc..7dd9551 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -251,6 +251,17 @@ ELSE (BUILD_SHARED_LIBS)
ENDIF (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
+# Option to Build Static executables
+#-----------------------------------------------------------------------------
+OPTION (BUILD_STATIC_EXECS "Build Static Executabless" OFF)
+IF (BUILD_STATIC_EXECS)
+ IF (NOT WIN32)
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
+ ENDIF (NOT WIN32)
+ENDIF (BUILD_STATIC_EXECS)
+
+#-----------------------------------------------------------------------------
# Option to use code coverage
#-----------------------------------------------------------------------------
OPTION (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)