You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/04/26 21:05:25 UTC
[3/5] mesos git commit: Windows: Added deprecation warning for VS
2015.
Windows: Added deprecation warning for VS 2015.
Specifically this checks if the generator used did not match "Visual
Studio 15 2017", which Mesos now prefers. Note that the
`CMAKE_GENERATOR` variable is expanded fully even when shorthand
is used, e.g. `-G "Visual Studio 15"` will correctly match.
Review: https://reviews.apache.org/r/57898/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c89884a5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c89884a5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c89884a5
Branch: refs/heads/master
Commit: c89884a5cf5143b9452b739d999a2073059572fb
Parents: 17139c5
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Tue Apr 25 18:27:01 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Wed Apr 26 14:04:08 2017 -0700
----------------------------------------------------------------------
cmake/CompilationConfigure.cmake | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c89884a5/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index 1c54669..dfaf6a6 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -163,7 +163,7 @@ if (NOT (CMAKE_SIZEOF_VOID_P EQUAL 8))
" * Linux: (on gcc) set `CMAKE_CXX_FLAGS` to include `-m64`:\n"
" `cmake -DCMAKE_CXX_FLAGS=-m64 `.\n"
" * Windows: use the VS win64 CMake generator:\n"
- " `cmake -G \"Visual Studio 10 Win64\"`.\n"
+ " `cmake -G \"Visual Studio 15 2017 Win64\"`.\n"
" * OS X: add `x86_64` to the `CMAKE_OSX_ARCHITECTURES`:\n"
" `cmake -DCMAKE_OSX_ARCHITECTURES=x86_64`.\n")
endif (NOT (CMAKE_SIZEOF_VOID_P EQUAL 8))
@@ -175,6 +175,18 @@ endif (NOT (CMAKE_SIZEOF_VOID_P EQUAL 8))
# We just check the MSVC version.
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
if (WIN32)
+ # Versions of Visual Studio older than 2017 do not support all core features
+ # of C++14, which prevents Mesos from moving past C++11. This adds a
+ # non-fatal deprecation warning.
+ set(PREFERRED_GENERATOR "Visual Studio 15 2017")
+ if (NOT CMAKE_GENERATOR MATCHES ${PREFERRED_GENERATOR})
+ message(
+ WARNING
+ "Mesos is deprecating support for ${CMAKE_GENERATOR}. "
+ "Please use ${PREFERRED_GENERATOR}."
+ )
+ endif (NOT CMAKE_GENERATOR MATCHES ${PREFERRED_GENERATOR})
+
# We don't support compilation against mingw headers (which, e.g., Clang on
# Windows does at this point), because this is likely to cost us more effort
# to support than it will be worth at least in the short term.