summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-01-15 17:38:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-01-15 17:38:06 (GMT)
commita0ae5e9b896d9548a58b830f5ffad618313a854e (patch)
treea24c611d2023712db08c09cba013829c97a38f1a /CMakeLists.txt
parent4077d99645623929cf0c61779c98539efb6742e7 (diff)
downloadhdf5-a0ae5e9b896d9548a58b830f5ffad618313a854e.zip
hdf5-a0ae5e9b896d9548a58b830f5ffad618313a854e.tar.gz
hdf5-a0ae5e9b896d9548a58b830f5ffad618313a854e.tar.bz2
HDFFV-11001 Add fine control over testing
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt48
1 files changed, 42 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63c36b0..1466865 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -435,17 +435,29 @@ endif ()
#-----------------------------------------------------------------------------
# Option to Build Shared and Static libs, default is both
#-----------------------------------------------------------------------------
-option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
-set (H5_ENABLE_STATIC_LIB YES)
-if (ONLY_SHARED_LIBS)
- set (H5_ENABLE_STATIC_LIB NO)
- set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
-endif ()
+option (BUILD_STATIC_LIBS "Build Static Libraries" ON)
+set (H5_ENABLE_STATIC_LIB NO)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)
+option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
+
+if (BUILD_STATIC_LIBS)
+ set (H5_ENABLE_STATIC_LIB YES)
+endif ()
if (BUILD_SHARED_LIBS)
set (H5_ENABLE_SHARED_LIB YES)
endif ()
+
+# Force only shared libraries if all OFF
+if (NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
+ set (ONLY_SHARED_LIBS ON CACHE BOOL "Only Build Shared Libraries" FORCE)
+endif ()
+
+if (ONLY_SHARED_LIBS)
+ set (H5_ENABLE_STATIC_LIB NO)
+ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
+endif ()
+
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
#-----------------------------------------------------------------------------
@@ -860,6 +872,30 @@ if (BUILD_TESTING)
include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+ option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_SERIAL)
+
+ option (HDF5_TEST_TOOLS "Execute tools tests" ON)
+ mark_as_advanced (HDF5_TEST_TOOLS)
+
+ option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON)
+ mark_as_advanced (HDF5_TEST_EXAMPLES)
+
+ option (HDF5_TEST_SWMR "Execute SWMR tests" ON)
+ mark_as_advanced (HDF5_TEST_SWMR)
+
+ option (HDF5_TEST_PARALLEL "Execute parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_PARALLEL)
+
+ option (HDF5_TEST_FORTRAN "Execute fortran tests" ON)
+ mark_as_advanced (HDF5_TEST_FORTRAN)
+
+ option (HDF5_TEST_CPP "Execute cpp tests" ON)
+ mark_as_advanced (HDF5_TEST_CPP)
+
+ option (HDF5_TEST_JAVA "Execute java tests" ON)
+ mark_as_advanced (HDF5_TEST_JAVA)
+
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
add_subdirectory (test)