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/07/02 01:37:39 UTC
[1/2] mesos git commit: Added CMake target to build mesos-master.
Repository: mesos
Updated Branches:
refs/heads/master 7f634f913 -> 7a56f57b2
Added CMake target to build mesos-master.
This adds the bare-minimum sources to get the master executable built
via CMake on Posix.
Review: https://reviews.apache.org/r/49501/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/13081e4f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/13081e4f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/13081e4f
Branch: refs/heads/master
Commit: 13081e4f2b432f27d35606bc67f0417d84239d37
Parents: 7f634f9
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Fri Jul 1 17:26:42 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jul 1 18:35:03 2016 -0700
----------------------------------------------------------------------
CMakeLists.txt | 1 +
cmake/MesosConfigure.cmake | 6 +-
src/CMakeLists.txt | 11 ++-
src/master/CMakeLists.txt | 49 ++++++++++
src/master/cmake/MasterConfigure.cmake | 145 ++++++++++++++++++++++++++++
5 files changed, 207 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/13081e4f/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c820dcd..31601a2 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,7 @@ list(
APPEND
CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/cmake/macros)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/cmake)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/master/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/slave/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/tests/cmake)
http://git-wip-us.apache.org/repos/asf/mesos/blob/13081e4f/cmake/MesosConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/MesosConfigure.cmake b/cmake/MesosConfigure.cmake
index 0913538..b2318ed 100755
--- a/cmake/MesosConfigure.cmake
+++ b/cmake/MesosConfigure.cmake
@@ -87,6 +87,10 @@ add_custom_target(
##################
include(SlaveConfigure)
+# CONFIGURE MASTER.
+##################
+include(MasterConfigure)
+
# MESOS LIBRARY CONFIGURATION.
##############################
-set(MESOS_TARGET mesos-${MESOS_PACKAGE_VERSION})
\ No newline at end of file
+set(MESOS_TARGET mesos-${MESOS_PACKAGE_VERSION})
http://git-wip-us.apache.org/repos/asf/mesos/blob/13081e4f/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7f22a7c..09dd0e0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -260,14 +260,16 @@ if (NOT WIN32)
master/quota_handler.cpp
master/registry.hpp
master/registrar.cpp
- # master/repairer.cpp
master/weights.cpp
master/weights_handler.cpp
master/allocator/allocator.cpp
master/allocator/mesos/hierarchical.cpp
master/allocator/mesos/metrics.cpp
+ master/allocator/sorter/drf/metrics.cpp
master/allocator/sorter/drf/sorter.cpp
master/contender/contender.cpp
+ master/contender/standalone.cpp
+ master/contender/zookeeper.cpp
)
endif (NOT WIN32)
@@ -484,11 +486,12 @@ target_link_libraries(${MESOS_TARGET} ${AGENT_LIBS})
# BUILD THE MESOS EXECUTABLES.
##############################
+add_subdirectory(docker/)
+add_subdirectory(health-check/)
+add_subdirectory(launcher/)
+add_subdirectory(master/)
add_subdirectory(slave/)
add_subdirectory(slave/containerizer/mesos/)
-add_subdirectory(launcher/)
-add_subdirectory(health-check/)
-add_subdirectory(docker/)
add_subdirectory(usage/)
# BUILD THE MESOS TESTS.
http://git-wip-us.apache.org/repos/asf/mesos/blob/13081e4f/src/master/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/master/CMakeLists.txt b/src/master/CMakeLists.txt
new file mode 100644
index 0000000..d9b4c17
--- /dev/null
+++ b/src/master/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# TODO(josephw): Enable this on Windows after sorting out the dependencies.
+if (NOT WIN32)
+
+# THE MASTER SOURCE.
+###################
+set(MASTER_EXECUTABLE_SRC
+ ${MASTER_EXECUTABLE_SRC}
+ main.cpp
+ )
+
+# INCLUDE DIRECTIVES FOR MASTER EXECUTABLE (generates, e.g., -I/path/to/thing
+# on Linux).
+############################################################################
+include_directories(${MASTER_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${MASTER_LIB_DIRS})
+
+# THE MASTER EXECUTABLE.
+#######################
+add_executable(${MESOS_MASTER} ${MASTER_EXECUTABLE_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_MASTER} ${MASTER_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_MASTER} ${MESOS_TARGET})
+
+endif (NOT WIN32)
http://git-wip-us.apache.org/repos/asf/mesos/blob/13081e4f/src/master/cmake/MasterConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/master/cmake/MasterConfigure.cmake b/src/master/cmake/MasterConfigure.cmake
new file mode 100644
index 0000000..6bbd7e8
--- /dev/null
+++ b/src/master/cmake/MasterConfigure.cmake
@@ -0,0 +1,145 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+include(StoutConfigure)
+
+if (NOT WIN32)
+ find_package(Apr REQUIRED)
+ find_package(Svn REQUIRED)
+endif (NOT WIN32)
+
+# Define process library dependencies. Tells the process library build targets
+# download/configure/build all third-party libraries before attempting to build.
+################################################################################
+set(MASTER_DEPENDENCIES
+ ${MASTER_DEPENDENCIES}
+ ${PROCESS_DEPENDENCIES}
+ ${PROCESS_TARGET}
+ ${ZOOKEEPER_TARGET}
+ ${LEVELDB_TARGET}
+ make_bin_include_dir
+ make_bin_src_dir
+ )
+
+# Define third-party include directories. Tells compiler toolchain where to get
+# headers for our third party libs (e.g., -I/path/to/glog on Linux).
+###############################################################################
+set(MASTER_INCLUDE_DIRS
+ ${MASTER_INCLUDE_DIRS}
+ ${MESOS_PUBLIC_INCLUDE_DIR}
+ # Contains (e.g.) compiled *.pb.h files.
+ ${MESOS_BIN_INCLUDE_DIR}
+ ${MESOS_BIN_INCLUDE_DIR}/mesos
+ ${MESOS_BIN_SRC_DIR}
+ ${MESOS_SRC_DIR}
+
+ ${PROCESS_INCLUDE_DIRS}
+ ${ZOOKEEPER_INCLUDE_DIR}
+ ${ZOOKEEPER_INCLUDE_GENDIR}
+ ${LEVELDB_INCLUDE_DIR}
+ )
+
+# Define third-party lib install directories. Used to tell the compiler
+# toolchain where to find our third party libs (e.g., -L/path/to/glog on
+# Linux).
+########################################################################
+set(MASTER_LIB_DIRS
+ ${MASTER_LIB_DIRS}
+ ${PROCESS_LIB_DIRS}
+ ${ZOOKEEPER_LIB_DIR}
+ )
+
+# Define third-party libs. Used to generate flags that the linker uses to
+# include our third-party libs (e.g., -lglog on Linux).
+#########################################################################
+set(MASTER_LIBS
+ ${MASTER_LIBS}
+ ${PROCESS_LIBS}
+ ${ZOOKEEPER_LFLAG}
+ ${PROCESS_TARGET}
+ )
+
+if (NOT WIN32)
+ set(MASTER_LIBS
+ ${MASTER_LIBS}
+ ${LEVELDB_LFLAG}
+ ${SASL_LFLAG}
+ )
+endif (NOT WIN32)
+
+if (NOT ENABLE_LIBEVENT)
+ set(MASTER_LIBS ${MASTER_LIBS} ${LIBEV_LFLAG})
+elseif (ENABLE_LIBEVENT)
+ set(MASTER_LIBS ${MASTER_LIBS} ${LIBEVENT_LFLAG})
+endif (NOT ENABLE_LIBEVENT)
+
+
+############################################################
+
+
+set(
+ PROCESS_MASTER_TARGET master
+ CACHE STRING "Master target")
+
+
+# COMPILER CONFIGURATION.
+#########################
+if (APPLE)
+ # GTEST on OSX needs its own tr1 tuple.
+ add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11)
+endif (APPLE)
+
+# DEFINE PROCESS MASTER LIBRARY DEPENDENCIES. Tells the process library build
+# tests target download/configure/build all third-party libraries before
+# attempting to build.
+###########################################################################
+set(PROCESS_MASTER_DEPENDENCIES
+ ${PROCESS_MASTER_DEPENDENCIES}
+ ${PROCESS_DEPENDENCIES}
+ ${GMOCK_TARGET}
+ )
+
+if (WIN32)
+ set(PROCESS_MASTER_DEPENDENCIES
+ ${PROCESS_MASTER_DEPENDENCIES}
+ )
+endif (WIN32)
+
+# DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
+# headers for our third party libs (e.g., -I/path/to/glog on Linux).
+###############################################################################
+set(PROCESS_MASTER_INCLUDE_DIRS
+ ${PROCESS_MASTER_INCLUDE_DIRS}
+ ${MASTER_INCLUDE_DIRS}
+ ${PROTOBUF_INCLUDE_DIR}
+ src
+ )
+
+if (WIN32)
+ set(PROCESS_MASTER_INCLUDE_DIRS
+ ${PROCESS_MASTER_INCLUDE_DIRS}
+ ${MASTER_INCLUDE_DIRS}
+ )
+endif (WIN32)
+
+# DEFINE THIRD-PARTY LIB INSTALL DIRECTORIES. Used to tell the compiler
+# toolchain where to find our third party libs (e.g., -L/path/to/glog on
+# Linux).
+########################################################################
+set(PROCESS_MASTER_LIB_DIRS
+ ${PROCESS_MASTER_LIB_DIRS}
+ ${MASTER_LIB_DIRS}
+ )
[2/2] mesos git commit: Fixed Windows build.
Posted by jo...@apache.org.
Fixed Windows build.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7a56f57b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7a56f57b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7a56f57b
Branch: refs/heads/master
Commit: 7a56f57b2236966658cb8ace6d45d11a56089dc1
Parents: 13081e4
Author: Joseph Wu <jo...@apache.org>
Authored: Fri Jul 1 18:35:55 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jul 1 18:35:55 2016 -0700
----------------------------------------------------------------------
3rdparty/stout/include/stout/os/windows/rmdir.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/7a56f57b/3rdparty/stout/include/stout/os/windows/rmdir.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/os/windows/rmdir.hpp b/3rdparty/stout/include/stout/os/windows/rmdir.hpp
index 3e13863..b74bf71 100644
--- a/3rdparty/stout/include/stout/os/windows/rmdir.hpp
+++ b/3rdparty/stout/include/stout/os/windows/rmdir.hpp
@@ -78,8 +78,8 @@ inline Try<Nothing> recursive_remove_directory(
// Delete current path, whether it's a directory, file, or symlink.
if (is_directory) {
- Try<Nothing> removed =
- recursive_remove_directory(current_absolute_path, removeRoot);
+ Try<Nothing> removed = recursive_remove_directory(
+ current_absolute_path, removeRoot, continueOnError);
if (removed.isError()) {
if (continueOnError) {