You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by bi...@apache.org on 2018/04/29 16:12:04 UTC

svn commit: r1830514 - in /axis/axis2/c/core/trunk/util: Makefile.am configure.ac gtest/ gtest/Makefile.am

Author: billblough
Date: Sun Apr 29 16:12:04 2018
New Revision: 1830514

URL: http://svn.apache.org/viewvc?rev=1830514&view=rev
Log:
Add gtest support for util

Added:
    axis/axis2/c/core/trunk/util/gtest/
    axis/axis2/c/core/trunk/util/gtest/Makefile.am   (with props)
Modified:
    axis/axis2/c/core/trunk/util/Makefile.am
    axis/axis2/c/core/trunk/util/configure.ac

Modified: axis/axis2/c/core/trunk/util/Makefile.am
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/Makefile.am?rev=1830514&r1=1830513&r2=1830514&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/Makefile.am (original)
+++ axis/axis2/c/core/trunk/util/Makefile.am Sun Apr 29 16:12:04 2018
@@ -15,7 +15,7 @@
 datadir=$(prefix)
 tmpincludedir=$(prefix)/include/axis2-${PACKAGE_VERSION}/
 includedir=$(prefix)/include/axis2-${PACKAGE_VERSION}/
-SUBDIRS = src $(TESTDIR) include
+SUBDIRS = src $(GTEST) $(TESTDIR) include
 include_HEADERS=$(top_builddir)/include/*.h
 tmpinclude_DATA=config.h
 data_DATA= INSTALL README AUTHORS NEWS CREDITS LICENSE COPYING

Modified: axis/axis2/c/core/trunk/util/configure.ac
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/configure.ac?rev=1830514&r1=1830513&r2=1830514&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/configure.ac (original)
+++ axis/axis2/c/core/trunk/util/configure.ac Sun Apr 29 16:12:04 2018
@@ -25,6 +25,7 @@ AC_PREFIX_DEFAULT(/usr/local/axis2_util)
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CPP
+AC_PROG_CXX
 AC_PROG_LIBTOOL
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -239,6 +240,26 @@ AC_ARG_ENABLE(coverage, [  --enable-cove
   CPPFLAGS="$CPPFLAGS"]
 )
 
+AC_MSG_CHECKING(whether to use use the Google test framework)
+AC_ARG_WITH(gtest,
+            [  --with-gtest[=PATH]      Find the gtest source files in 'PATH'.],
+[ case "$withval" in
+  no)
+    AC_MSG_RESULT(no)
+    USE_GTEST=""
+    GTEST_DIR=""
+    GTEST=""
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    GTEST_DIR="$withval"
+    GTEST="gtest"
+    CXXFLAGS="$CXXFLAGS -g -Wall -Wextra -pthread"
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
+
 
 AC_MSG_CHECKING(whether to build tests)
 AC_ARG_ENABLE(tests, [  --enable-tests    build tests. default=yes],
@@ -302,12 +323,15 @@ AC_SUBST(ZLIBBUILD)
 AC_SUBST(GUTHTHILA_DIR)
 AC_SUBST(GUTHTHILA_LIBS)
 AC_SUBST(TESTDIR)
+AC_SUBST(GTEST_DIR)
+AC_SUBST(GTEST)
 
 AC_CONFIG_FILES([Makefile \
     src/Makefile \
     src/platforms/unix/Makefile \
     src/minizip/Makefile \
     include/Makefile \
+    gtest/Makefile \
     test/Makefile \
     test/util/Makefile \
     test/allocator/Makefile \

Added: axis/axis2/c/core/trunk/util/gtest/Makefile.am
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/gtest/Makefile.am?rev=1830514&view=auto
==============================================================================
--- axis/axis2/c/core/trunk/util/gtest/Makefile.am (added)
+++ axis/axis2/c/core/trunk/util/gtest/Makefile.am Sun Apr 29 16:12:04 2018
@@ -0,0 +1,14 @@
+
+noinst_LIBRARIES = libgtest.a libgtest_main.a
+
+libgtest_a_SOURCES = $(GTEST_DIR)/src/gtest-all.cc
+libgtest_a_CPPFLAGS = -I$(GTEST_DIR)/include -I$(GTEST_DIR)
+libgtest_a_CXXFLAGS = -g -Wall -Wextra
+libgtest_a_LDFLAGS = -pthread
+
+libgtest_main_a_SOURCES = $(GTEST_DIR)/src/gtest_main.cc
+libgtest_main_CPPFLAGS = -I$(GTEST_DIR)/include -I$(GTEST_DIR)
+libgtest_main_a_CXXFLAGS = -g -Wall -Wextra
+libgtest_main_LDFLAGS = -pthread
+libgtest_main_a_LIBADD = libgtest.a
+

Propchange: axis/axis2/c/core/trunk/util/gtest/Makefile.am
------------------------------------------------------------------------------
    svn:eol-style = native