[svn-r19027] Add testing files to cmake resources.

Added code coverage option to cmake.

Tested: local linux
This commit is contained in:
Allen Byrne 2010-06-22 14:04:20 -05:00
parent bbba3fbf7b
commit f747973a51
3 changed files with 47 additions and 0 deletions

View File

@ -228,6 +228,16 @@ ELSE (BUILD_SHARED_LIBS)
ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Option to use code coverage
#-----------------------------------------------------------------------------
OPTION (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
IF (HDF5_ENABLE_COVERAGE)
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
SET (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
ENDIF (HDF5_ENABLE_COVERAGE)
#-----------------------------------------------------------------------------
# Set the target names of all the libraries
#-----------------------------------------------------------------------------

2
Resources/CTestCustom.ctest Executable file
View File

@ -0,0 +1,2 @@
SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)

35
Resources/cacheinit.cmake Executable file
View File

@ -0,0 +1,35 @@
# This is the CMakeCache file.
########################
# EXTERNAL cache entries
########################
SET (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
SET (HDF5_USE_H5DUMP_PACKED_BITS ON CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)