From a07004c825e3a4e4b61269fd3e5f2b57092f073c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 26 Sep 2011 09:04:15 -0500 Subject: [svn-r21418] Change windows default driver to SEC2 Add option to allow -fPIC --- CMakeLists.txt | 11 +++++++++++ config/cmake/ConfigureChecks.cmake | 4 +--- config/cmake/H5pubconf.h.in | 2 +- windows/src/H5pubconf.h | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f2d72f..bfb7ab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,6 +287,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/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 37560a5..cb75b27 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -159,11 +159,9 @@ IF (WINDOWS) # SET (H5_HAVE_WINDOW_PATH 1) SET (WINDOWS_MAX_BUF (1024 * 1024 * 1024)) - SET (H5_DEFAULT_VFD H5FD_WINDOWS) SET (LINK_LIBS ${LINK_LIBS} "kernel32") -ELSE (WINDOWS) - SET (H5_DEFAULT_VFD H5FD_SEC2) ENDIF (WINDOWS) +SET (H5_DEFAULT_VFD H5FD_SEC2) IF (WINDOWS) SET (H5_HAVE_IO_H 1) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index c685014..4407184 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -791,4 +791,4 @@ #undef inline #endif -#endif \ No newline at end of file +#endif diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index d750cae..2b35600 100755 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -41,7 +41,7 @@ #define H5_CXX_HAVE_OFFSETOF 1 /* Define the default virtual file driver to compile */ -#define H5_DEFAULT_VFD H5FD_WINDOWS +#define H5_DEFAULT_VFD H5FD_SEC2 /* Define if `dev_t' is a scalar */ #define H5_DEV_T_IS_SCALAR 1 -- cgit v0.12