diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-06-22 18:35:19 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-06-22 18:35:19 (GMT) |
commit | d48508fb8ccf1784056045acb1c483a3c9b7f846 (patch) | |
tree | 85f6028d5cbe6cdf9c16c0a1c5e8218f65aaaa5f /CMakeLists.txt | |
parent | 9f2151ac47c40b086e27d1c0d13496526fd234f0 (diff) | |
download | hdf5-d48508fb8ccf1784056045acb1c483a3c9b7f846.zip hdf5-d48508fb8ccf1784056045acb1c483a3c9b7f846.tar.gz hdf5-d48508fb8ccf1784056045acb1c483a3c9b7f846.tar.bz2 |
[svn-r19026] Add testing files to cmake resources.
Added code coverage option to cmake.
Tested: local linux
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f3f63af..1a7ebf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -229,6 +229,16 @@ ELSE (BUILD_SHARED_LIBS) 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} -fprofile-arcs -ftest-coverage") + SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") + SET (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage") +ENDIF (HDF5_ENABLE_COVERAGE) + +#----------------------------------------------------------------------------- # Set the target names of all the libraries #----------------------------------------------------------------------------- SET (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME}) |