summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-09-07 23:35:21 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-09-07 23:35:21 +0200
commitd80887ea20f98b5da1a8c1997957b2e0ccb5bbb7 (patch)
tree7d7f283451655c5c1319e6e299c04ff7ff2978b8
parentd3c4d5135bad0461356bd2f84f40a74b0bd9fd32 (diff)
downloadeurephia-d80887ea20f98b5da1a8c1997957b2e0ccb5bbb7.tar.gz
eurephia-d80887ea20f98b5da1a8c1997957b2e0ccb5bbb7.tar.xz
eurephia-d80887ea20f98b5da1a8c1997957b2e0ccb5bbb7.zip
Added --gcov configure option, to see how that will work
-rw-r--r--CMakeLists.txt4
-rwxr-xr-xconfigure10
2 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 976febb..61b3ed1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,7 @@ OPTION(SHOW_SECRETS "Show passwords as clear text in logs." OFF)
OPTION(SQLITE3 "Build database driver for SQLite3" OFF)
OPTION(EUREPHIADM "Build command line based admin utility" OFF)
OPTION(PLUGIN "Build the eurephia plugin for OpenVPN" OFF)
+OPTION(GCOV "Build eurephia with gcov features enabled" OFF)
# eurephia parameters - string values
SET(OPENVPN_SRC "" CACHE STRING "Path to OpenVPN source code")
@@ -42,6 +43,9 @@ SET(CMAKE_INSTALL_PREFIX ${PREFIX})
# Default C compiler flags
SET(CMAKE_C_FLAGS "-fno-delete-null-pointer-checks -g -Wall")
+IF(GCOV)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
+ENDIF(GCOV)
# Needed cmake modules
INCLUDE(CheckIncludeFile)
diff --git a/configure b/configure
index 9635174..4b5ca11 100755
--- a/configure
+++ b/configure
@@ -54,6 +54,7 @@ configure help for eurephia
--debug | -D -- Enable verbose debug logging
--show-secrets | -S -- Log passwords as clear text in log files
| (only available when debug is enabled)
+ --gcov | -- Enable gcov during building
** Plug-in options
--plug-in | -p -- Build the eurephia plug-in for OpenVPN
@@ -83,6 +84,7 @@ ADMIN="";
OPENVPN_SRC_DIR=""
PLUGIN=""
CONFIGUREPARAMS="$*"
+GCOV=""
# Parse all arguments
while [ ! -z "$1" ]; do
@@ -131,6 +133,10 @@ while [ ! -z "$1" ]; do
PARAMS="${PARAMS} -DSHOW_SECRETS=ON"
SECRETS_WARN=1
;;
+ --gcov)
+ PARAMS="${PARAMS} -DGCOV=ON"
+ GCOV=1
+ ;;
-p|--plug-in)
PARAMS="${PARAMS} -DPLUGIN=ON"
PLUGIN="eurephia-auth"
@@ -245,6 +251,10 @@ EOF
echo " SQLite3 database path: ${SQLITE3PREFIX}"
fi
+ if [ "$GCOV" = "1" ]; then
+ echo
+ echo "eurephia will be built with gcov. This may have a performance impact"
+ fi
echo
echo
# Make sure user is aware of enabled debug features.