]> granicus.if.org Git - libvpx/commitdiff
Enable unit tests by default
authorJohn Koleszar <jkoleszar@google.com>
Tue, 22 May 2012 18:51:14 +0000 (11:51 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Tue, 22 May 2012 22:00:06 +0000 (15:00 -0700)
Build unit tests by default if there is a working C++ toolchain
available.

Change-Id: I511558339b332fadfde37ef01b2dbf2755f48f89

configure

index 2b1328dbd27515f8ec849112e3861a5f391eff9f..eed6f970b5f9be617f133f917d7d80275c157d7e 100755 (executable)
--- a/configure
+++ b/configure
@@ -586,6 +586,16 @@ process_toolchain() {
     if enabled postproc_visualizer; then
         enabled postproc || die "postproc_visualizer requires postproc to be enabled"
     fi
+
+    # Enable unit tests if we have a working C++ compiler
+    case "$tgt_cc" in
+        vs*)
+            soft_enable unit_tests;;
+        *)
+            check_cxx "$@" <<EOF && soft_enable unit_tests
+int z;
+EOF
+    esac
 }