configure.ac | 48 +++++++++++++++++++++++++++--------------------- src/Makefile.am | 6 +++++- 2 files changed, 32 insertions(+), 22 deletions(-)
New commits: commit 237e3edb5a107d0928326ded5df3b0145f184ba4 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Sun Feb 7 21:31:09 2016 +0100 Don't build test directory if we disabled tests Change-Id: Ibdf7dfa89186bc1b352601cb423a8dcd4809ecd6 diff --git a/src/Makefile.am b/src/Makefile.am index 2cf2099..c9dad75 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = lib test +SUBDIRS = lib + +if ENABLE_TESTS +SUBDIRS += test +endif if BUILD_TOOLS SUBDIRS += conv commit 13431c9e425d93f61a7fc16f99f8d8c6e71ed82b Author: Andreas Sturmlechner <andreas.sturmlech...@gmail.com> Date: Sun Feb 7 21:30:44 2016 +0100 Enable building of unit tests without building tools Change-Id: I43fe1ace56c61f36d4dd0dedcf3f5438ee8c0b91 diff --git a/configure.ac b/configure.ac index 3b6edc7..a11115b 100644 --- a/configure.ac +++ b/configure.ac @@ -111,19 +111,40 @@ AC_ARG_ENABLE([tools], [enable_tools="$enableval"], [enable_tools=yes] ) + +# ========== +# Unit tests +# ========== +AC_ARG_ENABLE([tests], + [AS_HELP_STRING([--enable-tests], [Build and run unit tests])], + [enable_tests="$enableval"], + [enable_tests=yes] +) + +AS_IF([test "x$enable_tools" = "xyes" -o "x$enable_tests" = "xyes"], [ + PKG_CHECK_MODULES([REVENGE_STREAM],[ + librevenge-stream-0.0 + ]) +]) +AC_SUBST([REVENGE_STREAM_CFLAGS]) +AC_SUBST([REVENGE_STREAM_LIBS]) + +AS_IF([test "x$enable_tests" = "xyes"], [ + PKG_CHECK_MODULES([CPPUNIT], [cppunit]) +], []) +AC_SUBST([CPPUNIT_CFLAGS]) +AC_SUBST([CPPUNIT_LIBS]) + AS_IF([test "x$enable_tools" = "xyes"], [ PKG_CHECK_MODULES([REVENGE_GENERATORS],[ librevenge-generators-0.0 ]) - PKG_CHECK_MODULES([REVENGE_STREAM],[ - librevenge-stream-0.0 - ]) ]) AC_SUBST([REVENGE_GENERATORS_CFLAGS]) AC_SUBST([REVENGE_GENERATORS_LIBS]) -AC_SUBST([REVENGE_STREAM_CFLAGS]) -AC_SUBST([REVENGE_STREAM_LIBS]) -AM_CONDITIONAL(BUILD_TOOLS, [test "x$enable_tools" = "xyes"]) + +AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"]) +AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"]) # ================================= # Libtool/Version Makefile settings @@ -295,21 +316,6 @@ AS_IF([test "x$enable_debug" = "xyes"], [ ]) AC_SUBST(DEBUG_CXXFLAGS) -# ========== -# Unit tests -# ========== -AC_ARG_ENABLE([tests], - [AS_HELP_STRING([--enable-tests], [Build and run unit tests])], - [enable_tests="$enableval"], - [enable_tests=yes] -) -AS_IF([test "x$enable_tests" = "xyes"], [ - PKG_CHECK_MODULES([CPPUNIT], [cppunit]) -], []) -AC_SUBST([CPPUNIT_CFLAGS]) -AC_SUBST([CPPUNIT_LIBS]) -AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"]) - # ============= # Documentation # =============
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits