Commit 4bcf0dc2 authored by Dan Lipsa's avatar Dan Lipsa

Prefix BUILD_STATIC_EXECS with HDF5 and make it advanced.

Change-Id: Ie9451869f685db67c93717eda87ad81ac262c7ec
parent 55b75e42
......@@ -295,13 +295,14 @@ endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
option (BUILD_STATIC_EXECS "Build Static Executabless" OFF)
if (BUILD_STATIC_EXECS)
option (HDF5_BUILD_STATIC_EXECS "Build Static Executabless" OFF)
mark_as_advanced(HDF5_BUILD_STATIC_EXECS)
if (HDF5_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)
endif (HDF5_BUILD_STATIC_EXECS)
#-----------------------------------------------------------------------------
# Option to use code coverage
......@@ -887,7 +888,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
IF (CMAKE_SYSTEM_NAME MATCHES Linux AND BUILD_STATIC_EXECS)
IF (CMAKE_SYSTEM_NAME MATCHES Linux AND HDF5_BUILD_STATIC_EXECS)
# fix a link error caused by
# warning: Using 'getpwuid' in statically linked applications
# requires at runtime the shared libraries from the glibc version
......
......@@ -25,7 +25,7 @@ Compiling Options:
AM_CPPFLAGS: @AM_CPPFLAGS@
Shared Libraries: @H5_ENABLE_SHARED_LIB@
Static Libraries: @H5_ENABLE_STATIC_LIB@
Statically Linked Executables: @BUILD_STATIC_EXECS@
Statically Linked Executables: @HDF5_BUILD_STATIC_EXECS@
LDFLAGS: @CMAKE_SHARED_LINKER_FLAGS@
AM_LDFLAGS: @AM_LDFLAGS@
Extra libraries: @LINK_LIBS@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment