[Pcre-svn] [1162] code/trunk: Add Valgrind & coverage suppor…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1162] code/trunk: Add Valgrind & coverage support to the CMake configuration, but without the
Revision: 1162
          http://vcs.pcre.org/viewvc?view=rev&revision=1162
Author:   ph10
Date:     2012-10-23 11:46:43 +0100 (Tue, 23 Oct 2012)


Log Message:
-----------
Add Valgrind & coverage support to the CMake configuration, but without the
test for GCC for coverage, because I don't know how to do that.

Modified Paths:
--------------
    code/trunk/CMakeLists.txt
    code/trunk/config-cmake.h.in


Property Changed:
----------------
    code/trunk/



Property changes on: code/trunk
___________________________________________________________________
Name: svn:ignore
- .deps
.libs
CMakeCache.txt
CMakeFiles
DartTestfile.txt
INSTALL
Makefile
Makefile.in
Testing
aclocal.m4
autom4te.cache
cmake_install.cmake
config.guess
config.h
config.h.generic
config.h.in
config.log
config.status
config.sub
configure
depcomp
dftables
install-sh
libpcre.pc
libpcre16.pc
libpcre32.pc
libpcre.so
libpcrecpp.pc
libpcrecpp.so
libpcreposix.pc
libpcreposix.so
libtool
ltmain.sh
missing
pcre.h
pcre.h.generic
pcre_chartables.c
pcre-config
pcre_jit_test
pcre_scanner_unittest
pcre_stringpiece.h
pcre_stringpiece_unittest
pcrecpparg.h
pcrecpp_unittest
pcredemo
pcregrep
pcretest
progress.make
stamp-h1
test3input
test3output
testNinput
testsavedregex
teststderr
teststdout
testtemp1
testtemp2
testtry

+ .deps
.libs
CMakeCache.txt
CMakeFiles
DartTestfile.txt
INSTALL
Makefile
Makefile.in
Testing
aclocal.m4
autom4te.cache
cmake_install.cmake
compile
config.guess
config.h
config.h.generic
config.h.in
config.log
config.status
config.sub
configure
depcomp
dftables
install-sh
libpcre.pc
libpcre16.pc
libpcre32.pc
libpcre.so
libpcrecpp.pc
libpcrecpp.so
libpcreposix.pc
libpcreposix.so
libtool
ltmain.sh
missing
pcre.h
pcre.h.generic
pcre_chartables.c
pcre-config
pcre_jit_test
pcre_scanner_unittest
pcre_stringpiece.h
pcre_stringpiece_unittest
pcrecpparg.h
pcrecpp_unittest
pcredemo
pcregrep
pcretest
progress.make
stamp-h1
test3input
test3output
testNinput
testsavedregex
teststderr
teststdout
testtemp1
testtemp2
testtry


Modified: code/trunk/CMakeLists.txt
===================================================================
--- code/trunk/CMakeLists.txt    2012-10-22 22:05:07 UTC (rev 1161)
+++ code/trunk/CMakeLists.txt    2012-10-23 10:46:43 UTC (rev 1162)
@@ -59,6 +59,7 @@
 # 2012-02-26 PH added support for libedit
 # 2012-09-06 PH added support for PCRE_EBCDIC_NL25
 # 2012-09-08 ChPe added PCRE32 support
+# 2012-10-23 PH added support for VALGRIND and GCOV


PROJECT(PCRE C CXX)

@@ -160,6 +161,12 @@
 SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
     "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")


+SET(PCRE_SUPPORT_VALGRIND OFF CACHE BOOL
+    "Enable Valgrind support.")
+    
+SET(PCRE_SUPPORT_COVERAGE OFF CACHE BOOL
+    "Enable GCOV support.") 
+
 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)
@@ -285,6 +292,14 @@
         SET(SUPPORT_PCREGREP_JIT 1)
 ENDIF(PCRE_SUPPORT_PCREGREP_JIT)


+IF(PCRE_SUPPORT_VALGRIND)
+        SET(SUPPORT_VALGRIND 1)
+ENDIF(PCRE_SUPPORT_VALGRIND)
+
+IF(PCRE_SUPPORT_COVERAGE)
+        SET(SUPPORT_GCOV 1)
+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
@@ -928,6 +943,8 @@
   ELSE(READLINE_FOUND)
     MESSAGE(STATUS "  Link pcretest with libreadline .. : Library not found" )
   ENDIF(READLINE_FOUND)
+  MESSAGE(STATUS "  Support Valgrind .................: ${PCRE_SUPPORT_VALGRIND}")
+  MESSAGE(STATUS "  Support coverage .................: ${PCRE_SUPPORT_COVERAGE}")  


   IF(MINGW AND NOT PCRE_STATIC)
     MESSAGE(STATUS "  Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")


Modified: code/trunk/config-cmake.h.in
===================================================================
--- code/trunk/config-cmake.h.in    2012-10-22 22:05:07 UTC (rev 1161)
+++ code/trunk/config-cmake.h.in    2012-10-23 10:46:43 UTC (rev 1162)
@@ -38,6 +38,9 @@
 #cmakedefine SUPPORT_LIBEDIT 1
 #cmakedefine SUPPORT_LIBREADLINE 1


+#cmakedefine SUPPORT_VALGRIND 1
+#cmakedefine SUPPORT_GCOV 1
+
 #define NEWLINE            @NEWLINE@
 #define POSIX_MALLOC_THRESHOLD    @PCRE_POSIX_MALLOC_THRESHOLD@
 #define LINK_SIZE        @PCRE_LINK_SIZE@