]> granicus.if.org Git - libvpx/commitdiff
configure: test -std=c++11 before enabling unit tests
authorJames Zern <jzern@google.com>
Wed, 5 Dec 2018 00:38:08 +0000 (16:38 -0800)
committerJames Zern <jzern@google.com>
Wed, 5 Dec 2018 00:38:08 +0000 (16:38 -0800)
since:
77fa51003 Replace deprecated scoped_ptr with unique_ptr

the unit tests require a c++11 capable compiler; future versions of
googletest (1.9.x) will as well, so this change was inevitable if we
wanted to keep the snapshot up to date.

Change-Id: Id5c646bd10fae09e7b705b7d5fad1344f2216282

configure

index e0ffb55b4b5d9fca4c24b000f59f7f93d0e20d3f..cd9cbbc7af852090d836b63e1c786b980cf2b819 100755 (executable)
--- a/configure
+++ b/configure
@@ -730,18 +730,15 @@ process_toolchain() {
             # Some mingw toolchains don't have pthread available by default.
             # Treat these more like visual studio where threading in gtest
             # would be disabled for the same reason.
-            check_cxx "$@" <<EOF && soft_enable unit_tests
-int z;
-EOF
-            check_add_cxxflags -std=c++11 && soft_enable webm_io
+            check_add_cxxflags -std=c++11 && soft_enable unit_tests \
+              && soft_enable webm_io
             check_cxx "$@" <<EOF && soft_enable libyuv
 int z;
 EOF
         ;;
         *)
-            enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests
-int z;
-EOF
+            enabled pthread_h && check_add_cxxflags -std=c++11 \
+              && soft_enable unit_tests
             check_add_cxxflags -std=c++11 && soft_enable webm_io
             check_cxx "$@" <<EOF && soft_enable libyuv
 int z;