diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-02-04 20:07:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-02-04 20:07:30 (GMT) |
commit | 641a70b7e0e9c7516c830f309d93c456a546e385 (patch) | |
tree | 3d306c5c1c79a1aa128f93bbeaec03f08d51b783 | |
parent | defbf63228ecc5c601b888bdbbdd4568be08e51b (diff) | |
download | hdf5-641a70b7e0e9c7516c830f309d93c456a546e385.zip hdf5-641a70b7e0e9c7516c830f309d93c456a546e385.tar.gz hdf5-641a70b7e0e9c7516c830f309d93c456a546e385.tar.bz2 |
[svn-r20043] Add option to build static executables on non-windows machines
-rw-r--r-- | CMakeLists.txt | 11 |
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) |