You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2017/11/15 15:56:21 UTC

mesos git commit: Windows: Fixed build of Google Test with Visual Studio Preview.

Repository: mesos
Updated Branches:
  refs/heads/master 71c2d6ebf -> 3ce12d262


Windows: Fixed build of Google Test with Visual Studio Preview.

The preview version of Visual Studio (15.5) adds a new deprecation
warning that Google Test emits. Google Test is also built with
`-Werror`, and thus fails to build unless this warning is silenced.

Review: https://reviews.apache.org/r/63801/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3ce12d26
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3ce12d26
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3ce12d26

Branch: refs/heads/master
Commit: 3ce12d262596aa08e2521841b23edc32f2eb25a0
Parents: 71c2d6e
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Tue Nov 14 10:47:53 2017 -0800
Committer: James Peach <jp...@apache.org>
Committed: Wed Nov 15 07:55:32 2017 -0800

----------------------------------------------------------------------
 3rdparty/CMakeLists.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3ce12d26/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 7d38a9c..c34b65d 100755
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -688,6 +688,8 @@ set_target_properties(
   gtest PROPERTIES
   INTERFACE_INCLUDE_DIRECTORIES ${GOOGLETEST_ROOT}/googletest/include)
 
+set(GOOGLETEST_CMAKE_FORWARD_ARGS ${CMAKE_FORWARD_ARGS})
+
 if (WIN32)
   set_target_properties(
     gmock PROPERTIES
@@ -698,6 +700,12 @@ if (WIN32)
     gtest PROPERTIES
     IMPORTED_LOCATION_DEBUG ${GOOGLETEST_ROOT}-build/googlemock/gtest/Debug/gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
     IMPORTED_LOCATION_RELEASE ${GOOGLETEST_ROOT}-build/googlemock/gtest/Release/gtest${CMAKE_STATIC_LIBRARY_SUFFIX})
+
+  # Silence new deprecation warning in Visual Studio 15.5.
+  # NOTE: This has been patched upstream, but we don't patch Google Test.
+  # https://github.com/google/googletest/issues/1111
+  list(APPEND GOOGLETEST_CMAKE_FORWARD_ARGS
+    -DCMAKE_CXX_FLAGS=/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
 else ()
   set_target_properties(
     gmock PROPERTIES
@@ -713,8 +721,6 @@ MAKE_INCLUDE_DIR(gtest)
 GET_BYPRODUCTS(gmock)
 GET_BYPRODUCTS(gtest)
 
-set(GOOGLETEST_CMAKE_FORWARD_ARGS ${CMAKE_FORWARD_ARGS})
-
 # Unconditionally build static libraries.
 list(APPEND GOOGLETEST_CMAKE_FORWARD_ARGS -DBUILD_SHARED_LIBS=OFF)