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 2016/12/03 00:13:14 UTC
[2/5] mesos git commit: Fixed switchboard build break on Windows.
Fixed switchboard build break on Windows.
This commit will fix a build break on Windows 10, MSVC 1900, introduced
dually by commits `bd1bd1eeee50dcb23d65dcadb4903822ffd88cfb` and
`071ed5226be790aecd5ace1a7abda30b682078be`.
The recent additon of the I/O switchboard includes two things that break
the Windows build. This commit will correct both of them.
First, `switchboard_main.cpp` references several constructs that are
conditionally compiled out of the Windows build. One example is
`IOSwitchboardServerFlags`. This was never supposed to be built on
Windows, but it was accidentally added to the build, so this commit will
simply remove it from the Windows build.
Second, the I/O switchboard changes introduced a new flag,
`--io_switchboard_enable_server`, which is not implemented on Windows.
When this change was submitted, this flag was accidentally conditionally
not compiled on Windows builds, even though it is referenced in
`switchboard.cpp` (since initialization of the switchboard is different
when the server is not turned on). This commit will fix this issue by
simply moving the `#ifdef` down so that the symbol is defined and used
properly.
Review: https://reviews.apache.org/r/54324/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/49ccd13f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/49ccd13f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/49ccd13f
Branch: refs/heads/master
Commit: 49ccd13fa9cd50adaf11b4aff913a002e8b27cab
Parents: dbffa9d
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Dec 2 14:12:02 2016 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Dec 2 14:12:07 2016 -0800
----------------------------------------------------------------------
cmake/MesosConfigure.cmake | 8 +++---
src/slave/containerizer/mesos/CMakeLists.txt | 33 +++++++++++++++--------
src/slave/flags.hpp | 2 +-
3 files changed, 28 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/49ccd13f/cmake/MesosConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/MesosConfigure.cmake b/cmake/MesosConfigure.cmake
index 9f747e9..6a9ed9d 100755
--- a/cmake/MesosConfigure.cmake
+++ b/cmake/MesosConfigure.cmake
@@ -136,9 +136,11 @@ set(
MESOS_FETCHER mesos-fetcher
CACHE STRING "Target for fetcher")
-set(
- MESOS_IO_SWITCHBOARD mesos-io-switchboard
- CACHE STRING "Target for the IO switchboard")
+if (NOT WIN32)
+ set(
+ MESOS_IO_SWITCHBOARD mesos-io-switchboard
+ CACHE STRING "Target for the IO switchboard")
+endif (NOT WIN32)
set(
MESOS_MASTER mesos-master
http://git-wip-us.apache.org/repos/asf/mesos/blob/49ccd13f/src/slave/containerizer/mesos/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/CMakeLists.txt b/src/slave/containerizer/mesos/CMakeLists.txt
index a7596f2..650b1a2 100644
--- a/src/slave/containerizer/mesos/CMakeLists.txt
+++ b/src/slave/containerizer/mesos/CMakeLists.txt
@@ -21,27 +21,38 @@ set(CONTAINERIZER_EXECUTABLE_SRC
main.cpp
)
-set(MESOS_IO_SWITCHBOARD_SRC
- ${MESOS_IO_SWITCHBOARD_SRC}
- io/switchboard_main.cpp
- )
+if (NOT WIN32)
+ set(MESOS_IO_SWITCHBOARD_SRC
+ ${MESOS_IO_SWITCHBOARD_SRC}
+ io/switchboard_main.cpp
+ )
+endif (NOT WIN32)
# THE CONTAINERIZER EXECUTABLE.
###############################
add_executable(${MESOS_CONTAINERIZER} ${CONTAINERIZER_EXECUTABLE_SRC})
-add_executable(${MESOS_IO_SWITCHBOARD} ${MESOS_IO_SWITCHBOARD_SRC})
+if (NOT WIN32)
+ add_executable(${MESOS_IO_SWITCHBOARD} ${MESOS_IO_SWITCHBOARD_SRC})
+endif (NOT WIN32)
# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
######################################################
target_link_libraries(${MESOS_CONTAINERIZER} ${AGENT_LIBS} ${MESOS_LIBS_TARGET})
-target_link_libraries(${MESOS_IO_SWITCHBOARD} ${AGENT_LIBS} ${MESOS_LIBS_TARGET})
+if (NOT WIN32)
+ target_link_libraries(
+ ${MESOS_IO_SWITCHBOARD}
+ ${AGENT_LIBS}
+ ${MESOS_LIBS_TARGET})
+endif (NOT WIN32)
# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
####################################################################
-add_dependencies(
- ${MESOS_TARGET}
- ${MESOS_CONTAINERIZER}
- ${MESOS_IO_SWITCHBOARD})
+add_dependencies(${MESOS_TARGET} ${MESOS_CONTAINERIZER})
+if (NOT WIN32)
+ add_dependencies(${MESOS_TARGET} ${MESOS_IO_SWITCHBOARD})
+endif (NOT WIN32)
add_dependencies(${MESOS_CONTAINERIZER} ${MESOS_LIBS_TARGET})
-add_dependencies(${MESOS_IO_SWITCHBOARD} ${MESOS_LIBS_TARGET})
+if (NOT WIN32)
+ add_dependencies(${MESOS_IO_SWITCHBOARD} ${MESOS_LIBS_TARGET})
+endif (NOT WIN32)
http://git-wip-us.apache.org/repos/asf/mesos/blob/49ccd13f/src/slave/flags.hpp
----------------------------------------------------------------------
diff --git a/src/slave/flags.hpp b/src/slave/flags.hpp
index c6c3197..02af284 100644
--- a/src/slave/flags.hpp
+++ b/src/slave/flags.hpp
@@ -69,8 +69,8 @@ public:
#ifndef __WINDOWS__
bool switch_user;
- bool io_switchboard_enable_server;
#endif // __WINDOWS__
+ bool io_switchboard_enable_server;
std::string frameworks_home; // TODO(benh): Make an Option.
Duration registration_backoff_factor;
Duration authentication_backoff_factor;