CMake:[1/2] Moved `__WINDOWS__` flag definition to CompilationConfigure. Review: https://reviews.apache.org/r/39096
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ddc29a9d Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ddc29a9d Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ddc29a9d Branch: refs/heads/master Commit: ddc29a9d91a443d05d90d66baccfedaa1502e5db Parents: 2bec92c Author: Alex Clemmer <[email protected]> Authored: Wed Oct 14 14:04:08 2015 +0200 Committer: Joris Van Remoortere <[email protected]> Committed: Wed Oct 14 14:30:02 2015 +0200 ---------------------------------------------------------------------- cmake/CompilationConfigure.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/ddc29a9d/cmake/CompilationConfigure.cmake ---------------------------------------------------------------------- diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake index d1d7509..ab503b2 100644 --- a/cmake/CompilationConfigure.cmake +++ b/cmake/CompilationConfigure.cmake @@ -65,10 +65,16 @@ else (WIN32) "flag. Please use a different C++ compiler.") endif (WIN32) -# Convenience flags to simplify Windows support in C++ source. -if (MSVC) - add_definitions(-DMESOS_MSVC) -endif (MSVC) +# Convenience flags to simplify Windows support in C++ source, used to #ifdef +# out some platform-specific parts of Mesos. We choose to define a new flag +# rather than using an existing flag (e.g., `_WIN32`) because we want to give +# the build system fine-grained control over what code is #ifdef'd out in the +# future. Using only flags defined by our build system to control this logic is +# the clearest and most stable way of accomplishing this. +if (WIN32) + add_definitions(-D__WINDOWS__) +endif (WIN32) + # Configure directory structure for different platforms. ########################################################
