You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2017/12/19 23:20:34 UTC
mesos git commit: Windows: Added `/EHsc` to `CMAKE_CXX_FLAGS`.
Repository: mesos
Updated Branches:
refs/heads/master 4feb36706 -> a3febec7e
Windows: Added `/EHsc` to `CMAKE_CXX_FLAGS`.
After upgrading Visual Studio to 15.5.2, warning C4530 started being
emitted for practically every file. Since we use the STL (which uses
exceptions), apparently we need to compile with `/EHsc`. This sets the
exception-handling model to catch C++ exceptions, and to assume that
functions declared as `extern "C"` never throw a C++ exception.
Review: https://reviews.apache.org/r/64701
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a3febec7
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a3febec7
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a3febec7
Branch: refs/heads/master
Commit: a3febec7ebed3f0b28bebdcd336ce92979cd88ad
Parents: 4feb367
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Mon Dec 18 19:36:43 2017 -0800
Committer: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Committed: Tue Dec 19 15:20:11 2017 -0800
----------------------------------------------------------------------
cmake/CompilationConfigure.cmake | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a3febec7/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index dc9dc16..0ae0504 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -266,7 +266,14 @@ string(COMPARE EQUAL ${CMAKE_SYSTEM_NAME} "Linux" LINUX)
if (WIN32)
# COFF/PE and friends are somewhat limited in the number of sections they
# allow for an object file. We use this to avoid those problems.
- string(APPEND CMAKE_CXX_FLAGS " /bigobj /vd2 /permissive-")
+ string(APPEND CMAKE_CXX_FLAGS " /bigobj /vd2")
+
+ # Disable permissiveness.
+ string(APPEND CMAKE_CXX_FLAGS " /permissive-")
+
+ # Fix Warning C4530: C++ exception handler used, but unwind semantics are not
+ # enabled.
+ string(APPEND CMAKE_CXX_FLAGS " /EHsc")
# Build against the multi-threaded version of the C runtime library (CRT).
if (BUILD_SHARED_LIBS)