]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Makefile.am: build gtest in debug builds
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 9 Aug 2011 22:21:53 +0000 (15:21 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 9 Aug 2011 23:02:52 +0000 (16:02 -0700)
Formerly, we only built gtest when doing 'make check'. However, the
librados-api tests, which are built in debug mode for the 'all' target,
also use gtest. So build it when needed.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Makefile.am

index 7e79c1f8bcc7fce50db9d973ea57683d8852f68a..4e3386b1ecb9e3cfa8540dba7dd5a5593c43c071 100644 (file)
@@ -9,13 +9,18 @@ EXTRA_DIST += \
        src/test/downloads \
        udev/50-rbd.rules
 
-check-local:
-#      Build gtest before we build our own tests. Doing this instead
-#      of SUBDIRS because with that, gtest's own tests would be run
-#      and that would slow us down.
-       @echo "Making lib/libgtest.a lib/libgtest_main.a in src/gtest"
+
+all-local:
+if WITH_DEBUG
+#      We need gtest to build the rados-api tests. We only build those in
+#      a debug build, though.
        @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+endif
 
+check-local:
+#      We build gtest this way, instead of using SUBDIRS, because with that,
+#      gtest's own tests would be run and that would slow us down.
+       @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
 #      exercise cli tools
        $(srcdir)/src/test/run-cli-tests '$(top_builddir)/src/test'