diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | googlemock/CMakeLists.txt | 3 | ||||
-rw-r--r-- | googletest/CMakeLists.txt | 3 | ||||
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 68acbd3..797c289 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ install: # /usr/bin/gcc is 4.6 always, but gcc-X.Y is available. -- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi +- if [ "$CXX" = "g++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi # /usr/bin/clang is 3.4, lets override with modern one. - if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-3.7" CC="clang-3.7"; ln -sf /usr/bin/ccache /$HOME/bin/$CXX; ln -sf /usr/bin/ccache /$HOME/bin/$CC; fi # ccache on OS X needs installation first diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index 2051f15..58ffd44 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -75,7 +75,8 @@ include_directories("${gmock_SOURCE_DIR}/include" # VS 2012 11 1700 std::tr1::tuple + _VARIADIC_MAX=10 # VS 2013 12 1800 std::tr1::tuple # VS 2015 14 1900 std::tuple -# VS 2017 15 1910 std::tuple +# VS 2017 15 >= 1910 std::tuple + if (MSVC AND MSVC_VERSION EQUAL 1700) add_definitions(/D _VARIADIC_MAX=10) endif() diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index 8d4ab40..0092222 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -84,7 +84,8 @@ include_directories( # VS 2012 11 1700 std::tr1::tuple + _VARIADIC_MAX=10 # VS 2013 12 1800 std::tr1::tuple # VS 2015 14 1900 std::tuple -# VS 2017 15 1910 std::tuple +# VS 2017 15 >= 1910 std::tuple + if (MSVC AND MSVC_VERSION EQUAL 1700) add_definitions(/D _VARIADIC_MAX=10) endif() diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 55f9237..704dc02 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -642,8 +642,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) // STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>. # define GTEST_HAS_TR1_TUPLE 0 -# elif _MSC_VER >= 1910 - // VS2017 deprecated ::tr1::tuple +# elif defined(_MSC_VER) && (_MSC_VER >= 1910) +// Prevent `warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED.` # define GTEST_HAS_TR1_TUPLE 0 # else // The user didn't tell us not to do it, so we assume it's OK. |