diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2014-04-11 19:04:54 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2014-04-11 19:04:54 (GMT) |
commit | f466a5d298885c4d3dd813c0e6c8db9319cade50 (patch) | |
tree | 770e2cec48a2a6497ad1e0ce6175b5ec6d4424e4 /CMakeLists.txt | |
parent | 17a1f1a5976b98db1788200f0b015694f85cb008 (diff) | |
download | hdf5-f466a5d298885c4d3dd813c0e6c8db9319cade50.zip hdf5-f466a5d298885c4d3dd813c0e6c8db9319cade50.tar.gz hdf5-f466a5d298885c4d3dd813c0e6c8db9319cade50.tar.bz2 |
[svn-r25018] Purpose:
Merged r24893, r24961, r24965 from trunk.
Fix for thread-local storage resource leaks on Windows with Win32 threads.
Prohibits thread-safe + C++/Fortran/static library in CMake.
Tested on:
64-bit Windows 7 w/ Visual Studio 2012
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3708ac3..2cf05cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -716,18 +716,21 @@ endif (NOT HDF5_EXTERNALLY_CONFIGURED) # Note: Currently CMake only allows configuring of threadsafe on # non-Cygwin WINDOWS. #----------------------------------------------------------------------------- -if (WIN32) +if (WIN32 AND NOT CYGWIN) option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF) if (HDF5_ENABLE_THREADSAFE) # check for unsupported options + if (H5_BUILT_AS_STATIC_LIB) + message (FATAL_ERROR " **** thread-safety option not supported with static library **** ") + endif (H5_BUILT_AS_STATIC_LIB) if (HDF5_ENABLE_PARALLEL) - message (FATAL_ERROR " **** parallel and thread-safety options are mutually exclusive **** ") + message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ") endif (HDF5_ENABLE_PARALLEL) if (HDF5_BUILD_FORTRAN) - message (FATAL_ERROR " **** Fortran and thread-safety options are mutually exclusive **** ") + message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ") endif (HDF5_BUILD_FORTRAN) if (HDF5_BUILD_CPP_LIB) - message (FATAL_ERROR " **** C++ and thread-safety options are mutually exclusive **** ") + message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ") endif (HDF5_BUILD_CPP_LIB) set (H5_HAVE_THREADSAFE 1) if (H5_HAVE_IOEO) @@ -740,7 +743,7 @@ if (WIN32) endif (NOT H5_HAVE_PTHREAD_H) endif (H5_HAVE_IOEO) endif (HDF5_ENABLE_THREADSAFE) -endif (WIN32) +endif (WIN32 AND NOT CYGWIN) #----------------------------------------------------------------------------- # Add the HDF5 Library Target to the build |