summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt68
1 files changed, 48 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 799c1da..cd3e1c9 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,36 @@ 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 (STATUS " **** Fortran and thread-safety options are not supported **** ")
+ message (STATUS " **** thread-safety option will not be used building Fortran library **** ")
+ 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 (STATUS " **** C++ and thread-safety options are not supported **** ")
+ message (STATUS " **** thread-safety option will not be used building C++ library **** ")
+ 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)
@@ -601,8 +614,23 @@ if (BUILD_TESTING)
CACHE INTEGER
"Timeout in seconds for each test (default 1200=20minutes)"
)
+
+ option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
+ mark_as_advanced (HDF5_TEST_VFD)
+ if (HDF5_TEST_VFD)
+ option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_VFD)
+ endif (HDF5_TEST_VFD)
+
+ option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0")
+ mark_as_advanced (HDF_TEST_EXPRESS)
+
+ include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
+ configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+
enable_testing ()
include (CTest)
+
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib)
@@ -614,16 +642,6 @@ if (BUILD_TESTING)
endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
endif (H5_HAVE_PARALLEL)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
-
- option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
- mark_as_advanced (HDF5_TEST_VFD)
- if (HDF5_TEST_VFD)
- option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
- mark_as_advanced (HDF5_TEST_FHEAP_VFD)
- endif (HDF5_TEST_VFD)
-
- include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
- configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
@@ -667,9 +685,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 +727,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)