summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-06-22 19:04:20 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-06-22 19:04:20 (GMT)
commitf747973a518b5b4b7424e6a0293e7673c1055525 (patch)
tree04344793d66c58cc01500262ac32cb5dcf457808 /CMakeLists.txt
parentbbba3fbf7bf89fd2d00c0b13e6d80d740d1eb15d (diff)
downloadhdf5-f747973a518b5b4b7424e6a0293e7673c1055525.zip
hdf5-f747973a518b5b4b7424e6a0293e7673c1055525.tar.gz
hdf5-f747973a518b5b4b7424e6a0293e7673c1055525.tar.bz2
[svn-r19027] Add testing files to cmake resources.
Added code coverage option to cmake. Tested: local linux
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9f42ec..627f8b6 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} -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
#-----------------------------------------------------------------------------
SET (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME})