[Pcre-svn] [1342] code/trunk: Remove SUPPORT_GCOV from confi…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1342] code/trunk: Remove SUPPORT_GCOV from config.h, because it is not used and is misleading.
Revision: 1342
          http://vcs.pcre.org/viewvc?view=rev&revision=1342
Author:   ph10
Date:     2013-07-01 13:28:12 +0100 (Mon, 01 Jul 2013)


Log Message:
-----------
Remove SUPPORT_GCOV from config.h, because it is not used and is misleading.
(Coverage support does not need any code changes.)

Modified Paths:
--------------
    code/trunk/CMakeLists.txt
    code/trunk/ChangeLog
    code/trunk/README
    code/trunk/configure.ac


Modified: code/trunk/CMakeLists.txt
===================================================================
--- code/trunk/CMakeLists.txt    2013-06-28 15:07:57 UTC (rev 1341)
+++ code/trunk/CMakeLists.txt    2013-07-01 12:28:12 UTC (rev 1342)
@@ -61,6 +61,8 @@
 # 2012-09-08 ChPe added PCRE32 support
 # 2012-10-23 PH added support for VALGRIND and GCOV
 # 2012-12-08 PH added patch from Daniel Richard G to quash some MSVC warnings
+# 2013-07-01 PH realized that the "support" for GCOV was a total nonsense and
+#            so it has been removed.


PROJECT(PCRE C CXX)

@@ -165,9 +167,6 @@
 SET(PCRE_SUPPORT_VALGRIND OFF CACHE BOOL
     "Enable Valgrind support.")


-SET(PCRE_SUPPORT_COVERAGE OFF CACHE BOOL
-    "Enable code coverage support using gcov.")
-
 OPTION(PCRE_SHOW_REPORT    "Show the final configuration report" ON)
 OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON)
 OPTION(PCRE_BUILD_TESTS    "Build the tests" ON)
@@ -297,13 +296,6 @@
         SET(SUPPORT_VALGRIND 1)
 ENDIF(PCRE_SUPPORT_VALGRIND)


-IF(PCRE_SUPPORT_COVERAGE)
-        SET(SUPPORT_GCOV 1)
-        IF(NOT CMAKE_COMPILER_IS_GNUCC)
-            MESSAGE(FATAL_ERROR "Code coverage reports can only be generated when using GCC")
-        ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
-ENDIF(PCRE_SUPPORT_COVERAGE)
-
 # This next one used to contain
 #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})
 # but I was advised to add the NCURSES test as well, along with


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2013-06-28 15:07:57 UTC (rev 1341)
+++ code/trunk/ChangeLog    2013-07-01 12:28:12 UTC (rev 1342)
@@ -6,6 +6,14 @@


 1.  Add pcre[16|32]_jit_free_unused_memory to forcibly free unused JIT
     executable memory. Patch inspired by Carsten Klein.
+    
+2.  ./configure --enable-coverage defined SUPPORT_GCOV in config.h, although
+    this macro is never tested and has no effect, because the work to support
+    coverage involves only compiling and linking options and special targets in 
+    the Makefile. The comment in config.h implied that defining the macro would
+    enable coverage support, which is totally false. There was also support for
+    setting this macro in the CMake files (my fault, I just copied it from
+    configure). SUPPORT_GCOV has now been removed.



Version 8.33 28-May-2013

Modified: code/trunk/README
===================================================================
--- code/trunk/README    2013-06-28 15:07:57 UTC (rev 1341)
+++ code/trunk/README    2013-07-01 12:28:12 UTC (rev 1342)
@@ -344,7 +344,8 @@
   report is generated by running "make coverage". If ccache is installed on
   your system, it must be disabled when building PCRE for coverage reporting.
   You can do this by setting the environment variable CCACHE_DISABLE=1 before
-  running "make" to build PCRE.
+  running "make" to build PCRE. There is more information about coverage 
+  reporting in the "pcrebuild" documentation.


. The pcregrep program currently supports only 8-bit data files, and so
requires the 8-bit PCRE library. It is possible to compile pcregrep to use
@@ -971,4 +972,4 @@
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
-Last updated: 28 April 2013
+Last updated: 01 July 2013

Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac    2013-06-28 15:07:57 UTC (rev 1341)
+++ code/trunk/configure.ac    2013-07-01 12:28:12 UTC (rev 1342)
@@ -957,7 +957,7 @@
   fi
 fi


-# Check for valgrind
+# Handle valgrind support

 if test "$enable_valgrind" = "yes"; then
   m4_ifdef([PKG_CHECK_MODULES],
@@ -965,7 +965,7 @@
            [AC_MSG_ERROR([pkg-config not supported])])
 fi


-# test code coverage reporting
+# Handle code coverage reporting support
 if test "$enable_coverage" = "yes"; then
   if test "x$GCC" != "xyes"; then
     AC_MSG_ERROR([Code coverage reports can only be generated when using GCC])
@@ -996,11 +996,7 @@
     AC_MSG_ERROR([genhtml not found])
   fi


-  AC_DEFINE([SUPPORT_GCOV],[1], [
-    Define to allow pcretest and pcregrep to be linked with gcov, so that they
-    are able to generate code coverage reports.])
-
-  # And add flags needed for gcov
+  # Set flags needed for gcov
   GCOV_CFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
   GCOV_CXXFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
   GCOV_LIBS="-lgcov"