summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt41
1 files changed, 31 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 799c1da..5a1f68c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,6 +103,8 @@ if (HDF5_USE_FOLDERS)
endif (HDF5_USE_FOLDERS)
option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
mark_as_advanced (HDF5_NO_PACKAGES)
+option (ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF)
+mark_as_advanced (ALLOW_UNSUPPORTED)
#-----------------------------------------------------------------------------
# Set the core names of all the libraries
@@ -541,25 +543,34 @@ if (WIN32)
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)
+ message (STATUS " **** thread-safety option not supported with static library **** ")
+ message (STATUS " **** thread-safety option will not be used building static library **** ")
if (HDF5_ENABLE_PARALLEL)
- message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_ENABLE_PARALLEL)
if (HDF5_BUILD_FORTRAN)
- message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_BUILD_FORTRAN)
if (HDF5_BUILD_CPP_LIB)
- message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_BUILD_CPP_LIB)
- set (H5_HAVE_THREADSAFE 1)
if (H5_HAVE_IOEO)
message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
set (H5_HAVE_WIN_THREADS 1)
else (H5_HAVE_IOEO)
if (NOT H5_HAVE_PTHREAD_H)
- set (H5_HAVE_THREADSAFE 0)
message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
endif (NOT H5_HAVE_PTHREAD_H)
endif (H5_HAVE_IOEO)
@@ -667,9 +678,15 @@ set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
+ option (SKIP_HDF5_FORTRAN_SHARED "Do not build the fortran shared libraries" OFF)
if (HDF5_BUILD_FORTRAN)
if (BUILD_SHARED_LIBS AND APPLE)
- message (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Shared FORTRAN libraries are unsupported **** ")
+ set (SKIP_HDF5_FORTRAN_SHARED ON)
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported Fortran shared libraries **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (BUILD_SHARED_LIBS AND APPLE)
option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON)
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
@@ -703,7 +720,11 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
- message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported Parallel and C++ options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
endif (HDF5_ENABLE_PARALLEL)
if (CMAKE_NO_STD_NAMESPACE)
set (H5_NO_STD 1)