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/03/01 19:29:57 UTC

[01/11] mesos git commit: CMake:[1/2] Created patch for http parser.

Repository: mesos
Updated Branches:
  refs/heads/master 0fd95ccc5 -> 4194e395d


CMake:[1/2] Created patch for http parser.

Review: https://reviews.apache.org/r/42579/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/569e2f71
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/569e2f71
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/569e2f71

Branch: refs/heads/master
Commit: 569e2f716123aa98f29201a53690f34bb2f846bd
Parents: 0fd95cc
Author: mlawindi <ml...@microsoft.com>
Authored: Mon Feb 29 15:29:10 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:28 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/CMakeLists.txt     |  9 +++++++
 .../3rdparty/ry-http-parser-1c3624a.patch       | 28 ++++++++++++++++++++
 2 files changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/569e2f71/3rdparty/libprocess/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/CMakeLists.txt b/3rdparty/libprocess/3rdparty/CMakeLists.txt
index a030b5b..9f7e0b9 100644
--- a/3rdparty/libprocess/3rdparty/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/CMakeLists.txt
@@ -115,6 +115,14 @@ endif (NOT WIN32)
 
 set(RY_UPDATE_CMD ${CMAKE_COMMAND} -E copy ${PROCESS_3RD_SRC}/http-parser/CMakeLists.txt.template ${HTTP_PARSER_ROOT}/CMakeLists.txt)
 
+if (NOT WIN32)
+  set(HTTP_PARSER_PATCH_CMD  ${CMAKE_NOOP})
+elseif (WIN32)
+  # Set the patch command which will utilize patch.exe under
+  # `\Users\<user>\AppData\Local\Temp with no elevation prompt`
+  set(HTTP_PARSER_PATCH_CMD ${PATCHEXE_LOCATION} --binary -p1 < ${PROCESS_3RD_SRC}/ry-http-parser-${HTTP_PARSER_VERSION}.patch)
+endif (NOT WIN32)
+
 set(LIBEVENT_CMAKE_ARGS
   ${LIBEVENT_CMAKE_ARGS}
   -LH
@@ -163,6 +171,7 @@ ExternalProject_Add(
   ${HTTP_PARSER_TARGET}
   PREFIX            ${HTTP_PARSER_CMAKE_ROOT}
   UPDATE_COMMAND    ${RY_UPDATE_CMD}
+  PATCH_COMMAND     ${HTTP_PARSER_PATCH_CMD}
   INSTALL_COMMAND   ${CMAKE_NOOP}
   URL               ${HTTP_PARSER_URL}
   )

http://git-wip-us.apache.org/repos/asf/mesos/blob/569e2f71/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch b/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch
new file mode 100644
index 0000000..f9fac12
--- /dev/null
+++ b/3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch
@@ -0,0 +1,28 @@
+diff --git a/http_parser.h b/http_parser.h
+index c03ec05..747f47b 100644
+--- a/http_parser.h
++++ b/http_parser.h
+@@ -24,23 +24,8 @@
+ extern "C" {
+ #endif
+
+-
+ #include <sys/types.h>
+-#if defined(_WIN32) && !defined(__MINGW32__)
+-typedef __int8 int8_t;
+-typedef unsigned __int8 uint8_t;
+-typedef __int16 int16_t;
+-typedef unsigned __int16 uint16_t;
+-typedef __int32 int32_t;
+-typedef unsigned __int32 uint32_t;
+-typedef __int64 int64_t;
+-typedef unsigned __int64 uint64_t;
+-
+-typedef unsigned int size_t;
+-typedef int ssize_t;
+-#else
+ #include <stdint.h>
+-#endif
+
+ /* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run
+  * faster


[07/11] mesos git commit: CMake: Started to require 64-bit builds.

Posted by jo...@apache.org.
CMake: Started to require 64-bit builds.

Review: https://reviews.apache.org/r/43689/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ded4544d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ded4544d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ded4544d

Branch: refs/heads/master
Commit: ded4544d3dfa866d5ac2844286891e881cf11f96
Parents: 046a29e
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:30:47 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:44 2016 -0800

----------------------------------------------------------------------
 cmake/CompilationConfigure.cmake | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ded4544d/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index ab503b2..f491901 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -16,8 +16,24 @@
 
 # CONFIGURE COMPILATION.
 ########################
+option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." FALSE)
+
 string(COMPARE EQUAL ${CMAKE_SYSTEM_NAME} "Linux" LINUX)
 
+# Check that we are targeting a 64-bit architecture.
+if (NOT (CMAKE_SIZEOF_VOID_P EQUAL 8))
+  message(
+    FATAL_ERROR
+    "Mesos requires that we compile to a 64-bit target. Following are some "
+    "examples of how to accomplish this on some well-used platforms:\n"
+    "  * 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"
+    "  * 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))
+
 if (_DEBUG)
   set(CMAKE_BUILD_TYPE Debug)
 endif (_DEBUG)
@@ -52,6 +68,10 @@ if (WIN32)
       "Please use MSVC 1900 (included with Visual Studio 2015 or later).")
   endif (${MSVC_VERSION} LESS 1900)
 
+  # 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.
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj -DGOOGLE_GLOG_DLL_DECL= -DCURL_STATICLIB -D_SCL_SECURE_NO_WARNINGS /MP")
+
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
 elseif (COMPILER_SUPPORTS_CXX11)


[11/11] mesos git commit: CMake: Fixed Find* scripts to not explode if invoked twice.

Posted by jo...@apache.org.
CMake: Fixed Find* scripts to not explode if invoked twice.

Review: https://reviews.apache.org/r/43700/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ab5547dd
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ab5547dd
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ab5547dd

Branch: refs/heads/master
Commit: ab5547dd886185476e4c5791c3710b398790d51a
Parents: ded4544
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:31:07 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:58 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake | 7 +++++++
 3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake | 5 +++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ab5547dd/3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake
index 4b28aa1..9d55ba0 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake
@@ -39,6 +39,13 @@
 # CONFIGURE THE APR SEARCH. Specify what we're looking for, and which directories
 # we're going to look through to find them.
 #############################################################################
+unset(APRUTIL_LIB)
+unset(APRUTIL_INCLUDE_DIR)
+unset(APR_LIB)
+unset(APR_INCLUDE_DIR)
+unset(APR_LIBS)
+unset(APR_FOUND)
+
 set(POSSIBLE_APR_INCLUDE_DIRS
   ${POSSIBLE_APR_INCLUDE_DIRS}
   /opt/homebrew/opt/apr/include/apr-1

http://git-wip-us.apache.org/repos/asf/mesos/blob/ab5547dd/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
index c975a16..e85e882 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
@@ -35,6 +35,11 @@
 # CONFIGURE OUR SEARCH. Specify what we're looking for, and which directories
 # we're going to look through to find them.
 #############################################################################
+unset(SVN_LIB)
+unset(SVN_INCLUDE_DIR)
+unset(SVN_LIBS)
+unset(SVN_FOUND)
+
 set(POSSIBLE_SVN_INCLUDE_DIRECTORIES
   ${POSSIBLE_SVN_INCLUDE_DIRECTORIES}
   /usr/local/include/subversion-1


[08/11] mesos git commit: CMake:[1/3] Moved Stout configuration to its own file.

Posted by jo...@apache.org.
CMake:[1/3] Moved Stout configuration to its own file.

Review: https://reviews.apache.org/r/43697/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/86191221
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/86191221
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/86191221

Branch: refs/heads/master
Commit: 86191221cc3cf51ba5cc7ebde9903bc34bb0512a
Parents: ab5547d
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:31:12 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:58 2016 -0800

----------------------------------------------------------------------
 .../3rdparty/stout/cmake/StoutConfigure.cmake   | 121 +++++++++++++++++++
 .../stout/cmake/StoutTestsConfigure.cmake       |  64 +---------
 2 files changed, 127 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/86191221/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake
new file mode 100644
index 0000000..40482e6
--- /dev/null
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake
@@ -0,0 +1,121 @@
+# 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.
+
+if (NOT WIN32)
+  # TODO(hausdorff): (cf. MESOS-3181) Add support for attempting to find these
+  # packages on Windows, and then if that fails, use CMake macros/functions to
+  # download, configure, and build them.
+  #
+  # WHY: Windows does not have a good package manager, so getting some of our
+  # dependencies can be really annoying in some circumstances. For this reason,
+  # we should support a CMake-based "distribution channel", even though this
+  # way is sure to be more hackish.
+  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(STOUT_DEPENDENCIES
+  ${STOUT_DEPENDENCIES}
+  ${BOOST_TARGET}
+  ${GLOG_TARGET}
+  ${PROTOBUF_TARGET}
+  ${PICOJSON_TARGET}
+  )
+
+if (WIN32)
+  set(STOUT_DEPENDENCIES
+    ${STOUT_DEPENDENCIES}
+    ${CURL_TARGET}
+    )
+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(STOUT_INCLUDE_DIRS
+  ${STOUT_INCLUDE_DIRS}
+  ${STOUT_INCLUDE_DIR}
+  ${APR_INCLUDE_DIR}
+  ${BOOST_INCLUDE_DIR}
+  ${GLOG_INCLUDE_DIR}
+  ${PICOJSON_INCLUDE_DIR}
+  ${PROTOBUF_INCLUDE_DIR}
+  ${SVN_INCLUDE_DIR}
+  src
+  )
+
+if (WIN32)
+  set(STOUT_INCLUDE_DIRS
+    ${STOUT_INCLUDE_DIRS}
+    ${CURL_INCLUDE_DIR}
+    )
+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(STOUT_LIB_DIRS
+  ${STOUT_LIB_DIRS}
+  ${APR_LIBS}
+  ${GLOG_LIB_DIR}
+  ${PROTOBUF_LIB_DIR}
+  ${SVN_LIBS}
+  )
+
+if (WIN32)
+  set(STOUT_LIB_DIRS
+    ${STOUT_LIB_DIRS}
+    ${CURL_LIB_DIR}
+    )
+endif (WIN32)
+
+# DEFINE THIRD-PARTY LIBS. Used to generate flags that the linker uses to
+# include our third-party libs (e.g., -lglog on Linux).
+#########################################################################
+set(STOUT_LIBS
+  ${STOUT_LIBS}
+  ${CMAKE_THREAD_LIBS_INIT}
+  ${CURL_LFLAG}
+  ${GLOG_LFLAG}
+  ${SVN_LIBS}
+  ${PROTOBUF_LFLAG}
+  )
+
+if (WIN32)
+  set(STOUT_LIBS
+    ${STOUT_LIBS}
+    ws2_32
+    Mswsock
+    )
+else (WIN32)
+  set(STOUT_LIBS
+    ${STOUT_LIBS}
+    ${DL_LFLAG}
+    apr-1
+    )
+endif (WIN32)
+
+# TODO(hausdorff): The `LINUX` flag comes from MesosConfigure; when we
+# port the bootstrap script to CMake, we should also copy this logic
+# into .cmake files in the Stout and Process libraries' folders
+# individually.
+if (LINUX)
+  set(STOUT_LIBS ${STOUT_LIBS} rt)
+endif (LINUX)

http://git-wip-us.apache.org/repos/asf/mesos/blob/86191221/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
index 64b9412..2c786c5 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -18,19 +18,6 @@ set(
   STOUT_TESTS_TARGET stout_tests
   CACHE STRING "Target we use to refer to tests for the stout library")
 
-if (NOT WIN32)
-  # TODO(hausdorff): (cf. MESOS-3181) Add support for attempting to find these
-  # packages on Windows, and then if that fails, use CMake macros/functions to
-  # download, configure, and build them.
-  #
-  # WHY: Windows does not have a good package manager, so getting some of our
-  # dependencies can be really annoying in some circumstances. For this reason,
-  # we should support a CMake-based "distribution channel", even though this
-  # way is sure to be more hackish.
-  find_package(Apr REQUIRED)
-  find_package(Svn REQUIRED)
-endif (NOT WIN32)
-
 # COMPILER CONFIGURATION.
 #########################
 if (APPLE)
@@ -43,83 +30,44 @@ endif (APPLE)
 ################################################################################
 set(STOUT_TEST_DEPENDENCIES
   ${STOUT_TEST_DEPENDENCIES}
-  ${BOOST_TARGET}
-  ${GLOG_TARGET}
+  ${STOUT_DEPENDENCIES}
   ${GMOCK_TARGET}
   ${GTEST_TARGET}
-  ${PROTOBUF_TARGET}
   )
 
-if (WIN32)
-  set(STOUT_TEST_DEPENDENCIES ${STOUT_TEST_DEPENDENCIES} ${CURL_TARGET})
-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(STOUT_TEST_INCLUDE_DIRS
   ${STOUT_TEST_INCLUDE_DIRS}
-  ${STOUT_INCLUDE_DIR}
-  ${BOOST_INCLUDE_DIR}
-  ${PICOJSON_INCLUDE_DIR}
-  ${APR_INCLUDE_DIR}
-  ${SVN_INCLUDE_DIR}
+  ${STOUT_INCLUDE_DIRS}
   ${GMOCK_INCLUDE_DIR}
   ${GTEST_INCLUDE_DIR}
-  ${PROTOBUF_INCLUDE_DIR}
-  src
-  ${GLOG_INCLUDE_DIR}
   )
 
-if (WIN32)
-  set(STOUT_TEST_INCLUDE_DIRS ${STOUT_TEST_INCLUDE_DIRS} ${CURL_INCLUDE_DIR})
-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(STOUT_TEST_LIB_DIRS
   ${STOUT_TEST_LIB_DIRS}
-  ${APR_LIBS}
-  ${SVN_LIBS}
+  ${STOUT_LIB_DIRS}
   ${GMOCK_LIB_DIR}
   ${GTEST_LIB_DIR}
-  ${GLOG_LIB_DIR}
-  ${PROTOBUF_LIB_DIR}
   )
 
-if (WIN32)
-  set(STOUT_TEST_LIB_DIRS ${STOUT_TEST_LIB_DIRS} ${CURL_LIB_DIR})
-endif (WIN32)
-
 # DEFINE THIRD-PARTY LIBS. Used to generate flags that the linker uses to
 # include our third-party libs (e.g., -lglog on Linux).
 #########################################################################
 set(STOUT_TEST_LIBS
   ${STOUT_TEST_LIBS}
-  ${CMAKE_THREAD_LIBS_INIT}
+  ${STOUT_LIBS}
   ${GMOCK_LFLAG}
-  ${SVN_LIBS}
-  ${GLOG_LFLAG}
-  ${PROTOBUF_LFLAG}
   )
 
-if (WIN32)
-  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} ${CURL_LFLAG} ws2_32)
-else (WIN32)
+if (NOT WIN32)
   set(STOUT_TEST_LIBS
     ${STOUT_TEST_LIBS}
     ${GTEST_LFLAG}
-    ${DL_LFLAG}
-    apr-1
     )
-endif (WIN32)
-
-# TODO(hausdorff): The `LINUX` flag comes from MesosConfigure; when we
-# port the bootstrap script to CMake, we should also copy this logic
-# into .cmake files in the Stout and Process libraries' folders
-# individually.
-if (LINUX)
-  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} rt)
-endif (LINUX)
+endif (NOT WIN32)


[04/11] mesos git commit: CMake:[2/2] Fixed http-parser library directory for Windows builds.

Posted by jo...@apache.org.
CMake:[2/2] Fixed http-parser library directory for Windows builds.

Review: https://reviews.apache.org/r/43691/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9ababa35
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9ababa35
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9ababa35

Branch: refs/heads/master
Commit: 9ababa358217ef3758c8c0647a511a9973f30196
Parents: 569e2f7
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:30:09 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:34 2016 -0800

----------------------------------------------------------------------
 .../cmake/Process3rdpartyConfigure.cmake           | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9ababa35/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index cc9bc5a..5db49b0 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -71,18 +71,19 @@ else (WIN32)
 endif (WIN32)
 
 # Convenience variables for `lib` directories of built third-party dependencies.
-set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build)
 set(LIBEV_LIB_DIR       ${LIBEV_ROOT}-build/.libs)
 
 if (WIN32)
-  set(CURL_LIB_DIR     ${CURL_ROOT}/lib)
-  set(GLOG_LIB_DIR     ${GLOG_ROOT}-build/${CMAKE_BUILD_TYPE})
-  set(LIBEVENT_LIB_DIR ${LIBEVENT_ROOT}-build/lib)
-  set(PROTOBUF_LIB_DIR ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE})
+  set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build/${CMAKE_BUILD_TYPE})
+  set(CURL_LIB_DIR        ${CURL_ROOT}/lib)
+  set(GLOG_LIB_DIR        ${GLOG_ROOT}-build/${CMAKE_BUILD_TYPE})
+  set(LIBEVENT_LIB_DIR    ${LIBEVENT_ROOT}-build/lib)
+  set(PROTOBUF_LIB_DIR    ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE})
 else (WIN32)
-  set(GLOG_LIB_DIR     ${GLOG_LIB_ROOT}/lib)
-  set(LIBEVENT_LIB_DIR ${LIBEVENT_LIB_ROOT}/lib)
-  set(PROTOBUF_LIB_DIR ${PROTOBUF_LIB_ROOT}/lib)
+  set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build)
+  set(GLOG_LIB_DIR        ${GLOG_LIB_ROOT}/lib)
+  set(LIBEVENT_LIB_DIR    ${LIBEVENT_LIB_ROOT}/lib)
+  set(PROTOBUF_LIB_DIR    ${PROTOBUF_LIB_ROOT}/lib)
 endif (WIN32)
 
 # Convenience variables for "lflags", the symbols we pass to CMake to generate


[06/11] mesos git commit: CMake:[4/4] Included Socket library for 64-bit builds.

Posted by jo...@apache.org.
CMake:[4/4] Included Socket library for 64-bit builds.

Review: https://reviews.apache.org/r/43695/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/046a29ed
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/046a29ed
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/046a29ed

Branch: refs/heads/master
Commit: 046a29ed7b7e3330b95da13853f03337b4437097
Parents: 839829a
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:30:41 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:40 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/046a29ed/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
index a27cb98..64b9412 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -106,7 +106,7 @@ set(STOUT_TEST_LIBS
   )
 
 if (WIN32)
-  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} ${CURL_LFLAG})
+  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} ${CURL_LFLAG} ws2_32)
 else (WIN32)
   set(STOUT_TEST_LIBS
     ${STOUT_TEST_LIBS}


[03/11] mesos git commit: CMake:[2/4] Transitioned ZK build to be 64-bit and static.

Posted by jo...@apache.org.
CMake:[2/4] Transitioned ZK build to be 64-bit and static.

Review: https://reviews.apache.org/r/43693/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e042e80d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e042e80d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e042e80d

Branch: refs/heads/master
Commit: e042e80dc84ef9767315fd90d09c07723b138178
Parents: 94332ff
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:30:32 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:34 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/CMakeLists.txt     |  1 +
 .../libprocess/cmake/macros/VsBuildCommand.bat  | 75 +++++++++++++-------
 .../cmake/macros/VsBuildCommand.cmake           | 10 ++-
 3 files changed, 60 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e042e80d/3rdparty/libprocess/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/CMakeLists.txt b/3rdparty/libprocess/3rdparty/CMakeLists.txt
index 9f7e0b9..2b2da5b 100644
--- a/3rdparty/libprocess/3rdparty/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/CMakeLists.txt
@@ -260,6 +260,7 @@ elseif (WIN32)
       PROTOBUF
       ${PROTOBUF_ROOT}/vsprojects/protobuf.sln
       ${CMAKE_BUILD_TYPE}
+      ${PROTOBUF_ROOT}/vsprojects
       "libprotobuf libprotoc protoc")
 endif (NOT WIN32)
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e042e80d/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat b/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat
index 8da05bc..8d8f7c6 100644
--- a/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat
+++ b/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat
@@ -1,33 +1,52 @@
-:: 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.
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements.  See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership.  The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License.  You may obtain a copy of the License at
+REM
+REM     http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+
+
+REM Usage: `VsBuildCommand.bat solution_file configuration project_root projects`
+REM The arguments follow:
+REM   * solution_file: The `.sln` file we want to build.
+REM   * configuration: Type of build, usually `Debug` or `Release`.
+REM   * project_root: Path to the `.vcxproj` files for the `.sln` in the first
+REM     argument.
+REM   * projects: List of projects to compile. For example, the ZK list is just
+REM     "zookeeper", even though there is also a `Cli` project; the reason is
+REM     that we don't need the `Cli` project to build Mesos.
+REM
+REM NOTE: This script is fairly limited in 2 ways: it assumes that (1) all the
+REM VS project files for a solution are in `project_root`, and (2) all the
+REM project files are `.vcxproj` files (rather than, say, `.vcproj` files). This
+REM limitation can be overcome with more complicated command line parsing
+REM machinery, since our use case is fairly limited, we did not think the
+REM complexity was worth it.
 
 @echo off
 
-:: Parse command line params.
-for /f "tokens=1-2*" %%A in ("%*") do (
+REM Parse command line params.
+for /f "tokens=1-3*" %%A in ("%*") do (
   set SOLUTION_FILE=%%A
   set CONFIGURATION=%%B
-  set PROJECTS=%%C
+  set PROJECTS_ROOT=%%C
+  set PROJECTS=%%D
 )
 
-set PLATFORM=Win32
+set PLATFORM=x64
 setlocal EnableDelayedExpansion
 setlocal EnableExtensions
 
-:: Get Visual Studio 2015 install directory.
+REM Get Visual Studio 2015 install directory.
 set VS2015_KEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0
 set VS2015_INSTALLDIR_VALUE=InstallDir
 
@@ -36,21 +55,27 @@ in ('REG QUERY %VS2015_KEY% /v %VS2015_INSTALLDIR_VALUE% 2^>nul') do (
   set VS2015_DIR=%%C..\..
 )
 
-:: Check if Visual Studio 2015 is installed.
+REM Check if Visual Studio 2015 is installed.
 if defined VS2015_DIR (
   set SOLUTION_VER=12.00
-  :: Prepare Visual Studio 2015 command line environment.
+  set PROJECT_VER=14.00
+  REM Prepare Visual Studio 2015 command line environment.
   call "%VS2015_DIR%\VC\vcvarsall.bat" x86
 ) else (
   echo "No compiler : Microsoft Visual Studio (2015) is not installed."
   exit /b 1
 )
 
+REM For each project in the list of projects...
+for %%P in (%PROJECTS%) do (
+     devenv /upgrade %PROJECTS_ROOT%\%%P.vcxproj
+)
+
 FINDSTR ^
     /C:"Microsoft Visual Studio Solution File, Format Version %SOLUTION_VER%" ^
     %SOLUTION_FILE:/=\%
 if %errorlevel% neq 0 (
-  :: Upgrade solution file if its version does not match current %SOLUTION_VER%.
+  REM Upgrade solution file if its version does not match current %SOLUTION_VER%.
   echo "Upgrading Visual Studio Solution File: %SOLUTION_FILE% ."
   devenv /upgrade %SOLUTION_FILE%
 )
@@ -61,7 +86,9 @@ if not "%PROJECTS%" == "" (
 
 msbuild ^
     %SOLUTION_FILE% %PROJECTS_TARGET% ^
-    /p:Configuration=%CONFIGURATION%;Platform=%PLATFORM%
+    /p:Configuration=%CONFIGURATION%;Platform=%PLATFORM% ^
+    /p:PlatformTarget=%PLATFORM% ^
+    /p:RuntimeLibrary=MT_StaticDebug
 
 :end
 exit /b
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/mesos/blob/e042e80d/3rdparty/libprocess/cmake/macros/VsBuildCommand.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/macros/VsBuildCommand.cmake b/3rdparty/libprocess/cmake/macros/VsBuildCommand.cmake
index 632696e..c7b7953 100644
--- a/3rdparty/libprocess/cmake/macros/VsBuildCommand.cmake
+++ b/3rdparty/libprocess/cmake/macros/VsBuildCommand.cmake
@@ -19,7 +19,13 @@
 # Solution File(.sln). For example, when we want to build GLOG through Visual
 # Studio in command line, we would run this command. It would define
 # ${LIB_NAME_UPPER}_BUILD_CMD with build command finally.
-function(VS_BUILD_CMD LIB_NAME SOLUTION_FILE BUILD_CONFIGURATION PROJECTS)
+function(
+    VS_BUILD_CMD
+    LIB_NAME
+    SOLUTION_FILE
+    BUILD_CONFIGURATION
+    PROJECT_ROOT
+    PROJECT_NAMES)
 
   string(TOUPPER ${LIB_NAME} LIB_NAME_UPPER)
 
@@ -31,7 +37,7 @@ function(VS_BUILD_CMD LIB_NAME SOLUTION_FILE BUILD_CONFIGURATION PROJECTS)
   ## 1. Convert the path to Windows style.
   file(
     TO_NATIVE_PATH
-    "${VS_BUILD_SCRIPT} ${SOLUTION_FILE} ${BUILD_CONFIGURATION} ${PROJECTS}"
+    "${VS_BUILD_SCRIPT} ${SOLUTION_FILE} ${BUILD_CONFIGURATION} ${PROJECT_ROOT} ${PROJECT_NAMES}"
     BUILD_CMD_STRING)
   ## 2. Convert the command to list so that CMake could handle it correctly.
   string(REPLACE " " ";" BUILD_CMD ${BUILD_CMD_STRING})


[09/11] mesos git commit: CMake:[3/3] Used Stout config script in agent build.

Posted by jo...@apache.org.
CMake:[3/3] Used Stout config script in agent build.

Review: https://reviews.apache.org/r/43699/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4194e395
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4194e395
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4194e395

Branch: refs/heads/master
Commit: 4194e395d31411416e3e9b0f7bb30d6845a2b8e8
Parents: 684fce0
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:31:26 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:58 2016 -0800

----------------------------------------------------------------------
 CMakeLists.txt                       |  1 +
 src/slave/cmake/SlaveConfigure.cmake | 27 +++++++++++++++++----------
 2 files changed, 18 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4194e395/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc0082f..54b1da7 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,6 +82,7 @@ endif (WIN32 AND (NOT ENABLE_LIBEVENT))
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/cmake)
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/cmake)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/3rdparty/stout/cmake)
 list(
   APPEND
   CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/cmake/macros)

http://git-wip-us.apache.org/repos/asf/mesos/blob/4194e395/src/slave/cmake/SlaveConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/SlaveConfigure.cmake b/src/slave/cmake/SlaveConfigure.cmake
index a8270a9..5697a0b 100644
--- a/src/slave/cmake/SlaveConfigure.cmake
+++ b/src/slave/cmake/SlaveConfigure.cmake
@@ -14,15 +14,20 @@
 # 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(AGENT_DEPENDENCIES
   ${AGENT_DEPENDENCIES}
+  ${PROCESS_DEPENDENCIES}
   ${PROCESS_TARGET}
-  ${BOOST_TARGET}
-  ${GLOG_TARGET}
-  ${PICOJSON_TARGET}
   ${ZOOKEEPER_TARGET}
   make_bin_include_dir
   make_bin_src_dir
@@ -41,11 +46,6 @@ set(AGENT_INCLUDE_DIRS
   ${MESOS_SRC_DIR}
 
   ${PROCESS_INCLUDE_DIRS}
-  ${STOUT_INCLUDE_DIR}
-  ${BOOST_INCLUDE_DIR}
-  ${GLOG_INCLUDE_DIR}
-  ${PICOJSON_INCLUDE_DIR}
-  ${PROTOBUF_INCLUDE_DIR}
   ${ZOOKEEPER_INCLUDE_DIR}
   ${ZOOKEEPER_INCLUDE_GENDIR}
   )
@@ -57,7 +57,6 @@ set(AGENT_INCLUDE_DIRS
 set(AGENT_LIB_DIRS
   ${AGENT_LIB_DIRS}
   ${PROCESS_LIB_DIRS}
-  ${GLOG_LIB_DIR}
   ${ZOOKEEPER_LIB_DIR}
   )
 
@@ -67,9 +66,17 @@ set(AGENT_LIB_DIRS
 set(AGENT_LIBS
   ${AGENT_LIBS}
   ${PROCESS_LIBS}
-  ${GLOG_LFLAG}
+  ${ZOOKEEPER_LFLAG}
+  ${PROCESS_TARGET}
   )
 
+if (NOT WIN32)
+  set(AGENT_LIBS
+    ${AGENT_LIBS}
+    ${SASL_LFLAG}
+    )
+endif (NOT WIN32)
+
 if (NOT ENABLE_LIBEVENT)
   set(AGENT_LIBS ${AGENT_LIBS} ${LIBEV_LFLAG})
 elseif (ENABLE_LIBEVENT)


[02/11] mesos git commit: CMake:[3/4] Transitioned to static-everything builds on Windows.

Posted by jo...@apache.org.
CMake:[3/4] Transitioned to static-everything builds on Windows.

Review: https://reviews.apache.org/r/43694/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/839829ad
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/839829ad
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/839829ad

Branch: refs/heads/master
Commit: 839829adcd4ab225e4c07fc77281ae6daf5b1cc2
Parents: e042e80
Author: Alex Clemmer <cl...@gmail.com>
Authored: Tue Mar 1 10:01:09 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:34 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/CMakeLists.txt     | 20 ++++++++------------
 .../http-parser/CMakeLists.txt.template         |  2 +-
 .../cmake/Process3rdpartyConfigure.cmake        | 15 ++++++++-------
 .../libprocess/cmake/ProcessConfigure.cmake     |  9 +++++++--
 .../cmake/ProcessTestsConfigure.cmake           |  4 ++++
 3rdparty/libprocess/src/CMakeLists.txt          | 11 ++++++++++-
 6 files changed, 38 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/839829ad/3rdparty/libprocess/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/CMakeLists.txt b/3rdparty/libprocess/3rdparty/CMakeLists.txt
index 2b2da5b..ad979e5 100644
--- a/3rdparty/libprocess/3rdparty/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/CMakeLists.txt
@@ -54,7 +54,7 @@ if (WIN32)
   #
   # [1] https://github.com/google/glog/pull/43
   set(GLOG_URL   ${UPSTREAM_URL}/glog-v0.3.4-g4d391fe.tar.gz)
-  set(CURL_URL   ${UPSTREAM_URL}/curl-static-${CURL_VERSION}.tar.gz)
+  set(CURL_URL   ${UPSTREAM_URL}/curl-${CURL_VERSION}.tar.gz)
   set(LIBAPR_URL ${UPSTREAM_URL}/libapr-${LIBAPR_VERSION}.tar.gz)
 endif (WIN32)
 
@@ -200,6 +200,7 @@ if (WIN32)
   ExternalProject_Add(
     ${LIBAPR_TARGET}
     PREFIX          ${LIBAPR_CMAKE_ROOT}
+    CMAKE_ARGS      -DBUILD_SHARED_LIBS=OFF
     INSTALL_COMMAND ${LIBAPR_INSTALL_CMD}
     URL             ${LIBAPR_URL}
     )
@@ -213,9 +214,9 @@ if (WIN32)
   ExternalProject_Add(
     ${CURL_TARGET}
     PREFIX            ${CURL_CMAKE_ROOT}
+    CMAKE_ARGS        -DBUILD_CURL_TESTS=OFF -DCURL_STATICLIB=ON -DCMAKE_C_FLAGS_DEBUG="/MTd"
     PATCH_COMMAND     ${CMAKE_NOOP}
-    CONFIGURE_COMMAND ${CMAKE_NOOP}
-    BUILD_COMMAND     ${CMAKE_NOOP}
+    BUILD_COMMAND     msbuild /p:RuntimeLibrary=MT_StaticDebug lib/libcurl.vcxproj
     INSTALL_COMMAND   ${CMAKE_NOOP}
     URL               ${CURL_URL}
   )
@@ -236,7 +237,7 @@ if (WIN32)
   # library that compiles on Windows. We need to either send this as a PR back
   # to the protobuf project, or we need to apply these changes to our existing
   # protobuf tarball in the patch step.
-  set(PROTOBUF_URL ${UPSTREAM_URL}/protobuf-${PROTOBUF_VERSION}-msvc1900.tar.gz)
+  set(PROTOBUF_URL ${UPSTREAM_URL}/protobuf-3.0.0-beta-2.tar.gz)
 endif (WIN32)
 
 # NOTE: `gmock` is "installed" into a lib directory, see "NOTE: (fix for
@@ -253,15 +254,9 @@ if (NOT WIN32)
   set(PROTOBUF_BUILD_CMD   make)
   set(PROTOBUF_INSTALL_CMD make install)
 elseif (WIN32)
-  set(PROTOBUF_PATCH_CMD   ${CMAKE_NOOP})
-  set(PROTOBUF_CONFIG_CMD  ${CMAKE_NOOP})
+  set(PROTOBUF_CONFIG_CMD  cmake -G "Visual Studio 14 2015 Win64" ../protobuf-${PROTOBUF_VERSION}/cmake -DBUILD_SHARED_LIBS=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=ON -Dprotobuf_BUILD_TESTS=OFF)
+  set(PROTOBUF_BUILD_CMD   msbuild protobuf.sln)
   set(PROTOBUF_INSTALL_CMD ${CMAKE_NOOP})
-  VS_BUILD_CMD(
-      PROTOBUF
-      ${PROTOBUF_ROOT}/vsprojects/protobuf.sln
-      ${CMAKE_BUILD_TYPE}
-      ${PROTOBUF_ROOT}/vsprojects
-      "libprotobuf libprotoc protoc")
 endif (NOT WIN32)
 
 # NOTE: An implicit consequence of the following code is that on non-Windows
@@ -283,6 +278,7 @@ ExternalProject_Add(
 ExternalProject_Add(
   ${PROTOBUF_TARGET}
   PREFIX            ${PROTOBUF_CMAKE_ROOT}
+  CMAKE_ARGS        -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DCMAKE_CXX_FLAGS_DEBUG="/MTd"
   PATCH_COMMAND     ${PROTOBUF_PATCH_CMD}
   CONFIGURE_COMMAND ${PROTOBUF_CONFIG_CMD}
   BUILD_COMMAND     ${PROTOBUF_BUILD_CMD}

http://git-wip-us.apache.org/repos/asf/mesos/blob/839829ad/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template b/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
index bf2aa38..056a1c1 100644
--- a/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
+++ b/3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template
@@ -31,4 +31,4 @@ set(HTTP_PARSER_SRC
   http_parser.h
   )
 
-add_library(http_parser ${HTTP_PARSER_SRC})
+add_library(http_parser STATIC ${HTTP_PARSER_SRC})

http://git-wip-us.apache.org/repos/asf/mesos/blob/839829ad/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index 5db49b0..167b599 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -36,8 +36,9 @@ elseif (WIN32)
   # require 0.3.4.
   EXTERNAL("glog" "0.3.4" "${PROCESS_3RD_BIN}")
 
-  # NOTE: We expect cURL exists on Unix (usually pulled in with a package
-  # manager), but Windows has no package manager, so we have to go get it.
+  # NOTE: We expect cURL and zlib exist on Unix (usually pulled in with a
+  # package manager), but Windows has no package manager, so we have to go
+  # get it.
   EXTERNAL("curl" ${CURL_VERSION} "${PROCESS_3RD_BIN}")
 endif (NOT WIN32)
 
@@ -75,10 +76,10 @@ set(LIBEV_LIB_DIR       ${LIBEV_ROOT}-build/.libs)
 
 if (WIN32)
   set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build/${CMAKE_BUILD_TYPE})
-  set(CURL_LIB_DIR        ${CURL_ROOT}/lib)
+  set(CURL_LIB_DIR        ${CURL_ROOT}-build/lib/${CMAKE_BUILD_TYPE})
   set(GLOG_LIB_DIR        ${GLOG_ROOT}-build/${CMAKE_BUILD_TYPE})
   set(LIBEVENT_LIB_DIR    ${LIBEVENT_ROOT}-build/lib)
-  set(PROTOBUF_LIB_DIR    ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE})
+  set(PROTOBUF_LIB_DIR    ${PROTOBUF_ROOT}-build/${CMAKE_BUILD_TYPE})
 else (WIN32)
   set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build)
   set(GLOG_LIB_DIR        ${GLOG_LIB_ROOT}/lib)
@@ -99,8 +100,8 @@ if (WIN32)
   # and on Windows it should be curl.lib. But on Windows, it's actually
   # libcurl.lib. Hence, we have to special case it here because CMake assumes
   # the library names are generated correctly.
-  set(CURL_LFLAG     libcurl_a)
-  set(PROTOBUF_LFLAG libprotobuf)
+  set(CURL_LFLAG     libcurl)
+  set(PROTOBUF_LFLAG libprotobufd)
 else (WIN32)
   set(CURL_LFLAG     curl)
   set(DL_LFLAG       dl)
@@ -112,7 +113,7 @@ endif (WIN32)
 if (NOT WIN32)
   set(PROTOC ${PROTOBUF_LIB_ROOT}/bin/protoc)
 else (NOT WIN32)
-  set(PROTOC ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE}/protoc.exe)
+  set(PROTOC ${PROTOBUF_ROOT}-build/${CMAKE_BUILD_TYPE}/protoc.exe)
 endif (NOT WIN32)
 
 # Configure the process library, the last of our third-party libraries.

http://git-wip-us.apache.org/repos/asf/mesos/blob/839829ad/3rdparty/libprocess/cmake/ProcessConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessConfigure.cmake b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
index 2a37fdb..6b804cd 100755
--- a/3rdparty/libprocess/cmake/ProcessConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
@@ -121,7 +121,6 @@ find_package(Threads REQUIRED)
 
 set(PROCESS_LIBS
   ${PROCESS_LIBS}
-  ${PROCESS_TARGET}
   ${GLOG_LFLAG}
   ${HTTP_PARSER_LFLAG}
   ${CMAKE_THREAD_LIBS_INIT}
@@ -134,7 +133,12 @@ elseif (ENABLE_LIBEVENT)
 endif (NOT ENABLE_LIBEVENT)
 
 if (WIN32)
-  set(PROCESS_LIBS ${PROCESS_LIBS} ${CURL_LFLAG})
+  set(PROCESS_LIBS
+    ${PROCESS_LIBS}
+    ${CURL_LFLAG}
+    ws2_32
+    Mswsock
+    )
 elseif (NOT WIN32)
   find_package(ZLIB REQUIRED)
 
@@ -149,5 +153,6 @@ elseif (NOT WIN32)
   set(PROCESS_LIBS
     ${PROCESS_LIBS}
     ${ZLIB_LIBRARIES}
+    pthread
     )
 endif (WIN32)

http://git-wip-us.apache.org/repos/asf/mesos/blob/839829ad/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake b/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
index 3a2e099..83afd25 100644
--- a/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
@@ -75,6 +75,7 @@ endif (APPLE)
 set(PROCESS_TEST_DEPENDENCIES
   ${PROCESS_TEST_DEPENDENCIES}
   ${PROCESS_DEPENDENCIES}
+  ${PROCESS_TARGET}
   ${GMOCK_TARGET}
   )
 
@@ -97,6 +98,8 @@ set(PROCESS_TEST_INCLUDE_DIRS
 set(PROCESS_TEST_LIB_DIRS
   ${PROCESS_TEST_LIB_DIRS}
   ${PROCESS_LIB_DIRS}
+  ${CMAKE_CURRENT_BINARY_DIR}/.. # libprocess directory.
+
   ${GMOCK_LIB_DIR}
   ${GTEST_LIB_DIR}
   )
@@ -106,6 +109,7 @@ set(PROCESS_TEST_LIB_DIRS
 #########################################################################
 set(PROCESS_TEST_LIBS
   ${PROCESS_TEST_LIBS}
+  ${PROCESS_TARGET}
   ${PROCESS_LIBS}
   ${GMOCK_LFLAG}
   ${GTEST_LFLAG}

http://git-wip-us.apache.org/repos/asf/mesos/blob/839829ad/3rdparty/libprocess/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/CMakeLists.txt b/3rdparty/libprocess/src/CMakeLists.txt
index 12dfaf6..a8379d3 100644
--- a/3rdparty/libprocess/src/CMakeLists.txt
+++ b/3rdparty/libprocess/src/CMakeLists.txt
@@ -67,12 +67,21 @@ endif (ENABLE_LIBEVENT)
 ###########################################################################
 include_directories(${PROCESS_INCLUDE_DIRS})
 
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${PROCESS_LIB_DIRS})
+
 # THE PROCESS LIBRARY (generates, e.g., libprocess.so, etc., on Linux).
 #######################################################################
-add_library(${PROCESS_TARGET} ${PROCESS_SRC})
+add_library(${PROCESS_TARGET} STATIC ${PROCESS_SRC})
 set_target_properties(
   ${PROCESS_TARGET} PROPERTIES
   VERSION ${PROCESS_PACKAGE_VERSION}
   SOVERSION ${PROCESS_PACKAGE_SOVERSION}
   )
 add_dependencies(${PROCESS_TARGET} ${PROCESS_DEPENDENCIES})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${PROCESS_TARGET} ${PROCESS_LIBS})


[10/11] mesos git commit: CMake:[2/3] Used new Stout config script in libprocess 3rdparty build.

Posted by jo...@apache.org.
CMake:[2/3] Used new Stout config script in libprocess 3rdparty build.

Review: https://reviews.apache.org/r/43698/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/684fce00
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/684fce00
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/684fce00

Branch: refs/heads/master
Commit: 684fce00f04b26f2c17a47063c332281b4c147c3
Parents: 86191221
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:31:19 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:58 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/CMakeLists.txt     |  1 +
 .../cmake/Process3rdpartyConfigure.cmake        |  1 +
 .../libprocess/cmake/ProcessConfigure.cmake     | 39 +++-----------------
 3 files changed, 8 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/684fce00/3rdparty/libprocess/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/CMakeLists.txt b/3rdparty/libprocess/3rdparty/CMakeLists.txt
index ad979e5..b8351ad 100644
--- a/3rdparty/libprocess/3rdparty/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/CMakeLists.txt
@@ -292,5 +292,6 @@ list(
   APPEND CMAKE_MODULE_PATH
   ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/3rdparty/stout/cmake
   )
+include(StoutConfigure)
 include(StoutTestsConfigure)
 add_subdirectory(stout/tests)

http://git-wip-us.apache.org/repos/asf/mesos/blob/684fce00/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index 167b599..e42cf19 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -118,6 +118,7 @@ endif (NOT WIN32)
 
 # Configure the process library, the last of our third-party libraries.
 #######################################################################
+include(StoutConfigure)
 include(ProcessConfigure)
 
 # Define target for AGENT.

http://git-wip-us.apache.org/repos/asf/mesos/blob/684fce00/3rdparty/libprocess/cmake/ProcessConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessConfigure.cmake b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
index 6b804cd..61edad9 100755
--- a/3rdparty/libprocess/cmake/ProcessConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
@@ -49,11 +49,8 @@ set(PROCESS_TARGET process-${PROCESS_PACKAGE_VERSION})
 ################################################################################
 set(PROCESS_DEPENDENCIES
   ${PROCESS_DEPENDENCIES}
-  ${BOOST_TARGET}
-  ${GLOG_TARGET}
-  ${PICOJSON_TARGET}
+  ${STOUT_DEPENDENCIES}
   ${HTTP_PARSER_TARGET}
-  ${PROTOBUF_TARGET}
   )
 
 if (NOT ENABLE_LIBEVENT)
@@ -62,20 +59,13 @@ elseif (ENABLE_LIBEVENT)
   set(PROCESS_DEPENDENCIES ${PROCESS_DEPENDENCIES} ${LIBEVENT_TARGET})
 endif (NOT ENABLE_LIBEVENT)
 
-if (WIN32)
-  set(PROCESS_DEPENDENCIES ${PROCESS_DEPENDENCIES} ${CURL_TARGET})
-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_INCLUDE_DIRS
   ${PROCESS_INCLUDE_DIRS}
+  ${STOUT_INCLUDE_DIRS}
   ${PROCESS_INCLUDE_DIR}
-  ${STOUT_INCLUDE_DIR}
-  ${BOOST_INCLUDE_DIR}
-  ${PICOJSON_INCLUDE_DIR}
-  ${GLOG_INCLUDE_DIR}
   ${HTTP_PARSER_INCLUDE_DIR}
   )
 
@@ -89,17 +79,13 @@ if (HAS_GPERFTOOLS)
   set(PROCESS_INCLUDE_DIRS ${PROCESS_INCLUDE_DIRS} ${GPERFTOOLS_INCLUDE_DIR})
 endif (HAS_GPERFTOOLS)
 
-if (WIN32)
-  set(PROCESS_INCLUDE_DIRS ${PROCESS_INCLUDE_DIRS} ${CURL_INCLUDE_DIR})
-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_LIB_DIRS
   ${PROCESS_LIB_DIRS}
-  ${GLOG_LIB_DIR}
+  ${STOUT_LIB_DIRS}
   ${HTTP_PARSER_LIB_DIR}
   )
 
@@ -109,11 +95,6 @@ elseif (ENABLE_LIBEVENT)
   set(PROCESS_LIB_DIRS ${PROCESS_LIB_DIRS} ${LIBEVENT_LIB_DIR})
 endif (NOT ENABLE_LIBEVENT)
 
-if (WIN32)
-  set(PROCESS_LIB_DIRS ${PROCESS_LIB_DIRS} ${CURL_LIB_DIR})
-endif (WIN32)
-
-
 # Define third-party libs. Used to generate flags that the linker uses to
 # include our third-party libs (e.g., -lglog on Linux).
 #########################################################################
@@ -121,9 +102,8 @@ find_package(Threads REQUIRED)
 
 set(PROCESS_LIBS
   ${PROCESS_LIBS}
-  ${GLOG_LFLAG}
+  ${STOUT_LIBS}
   ${HTTP_PARSER_LFLAG}
-  ${CMAKE_THREAD_LIBS_INIT}
   )
 
 if (NOT ENABLE_LIBEVENT)
@@ -132,14 +112,7 @@ elseif (ENABLE_LIBEVENT)
   set(PROCESS_LIBS ${PROCESS_LIBS} ${LIBEVENT_LFLAG})
 endif (NOT ENABLE_LIBEVENT)
 
-if (WIN32)
-  set(PROCESS_LIBS
-    ${PROCESS_LIBS}
-    ${CURL_LFLAG}
-    ws2_32
-    Mswsock
-    )
-elseif (NOT WIN32)
+if (NOT WIN32)
   find_package(ZLIB REQUIRED)
 
   # TODO(hausdorff): (MESOS-3396) The `LINUX` flag comes from MesosConfigure;
@@ -155,4 +128,4 @@ elseif (NOT WIN32)
     ${ZLIB_LIBRARIES}
     pthread
     )
-endif (WIN32)
+endif (NOT WIN32)


[05/11] mesos git commit: CMake:[1/4] Transitioned to 64-bit build of ZK on Windows.

Posted by jo...@apache.org.
CMake:[1/4] Transitioned to 64-bit build of ZK on Windows.

Review: https://reviews.apache.org/r/43692/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/94332ffd
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/94332ffd
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/94332ffd

Branch: refs/heads/master
Commit: 94332ffdff23768f222057223465b1c407c5e66d
Parents: 9ababa3
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:30:24 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:34 2016 -0800

----------------------------------------------------------------------
 3rdparty/CMakeLists.txt                     |  6 +-
 3rdparty/cmake/Mesos3rdpartyConfigure.cmake | 14 +++-
 3rdparty/zookeeper-06d3f3f.patch            | 85 ++++++++++++++++++++++++
 cmake/MesosConfigure.cmake                  |  1 +
 src/CMakeLists.txt                          |  4 +-
 5 files changed, 104 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/94332ffd/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 273cec7..68020dc 100755
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -54,13 +54,15 @@ elseif (WIN32)
   # Set the patch command which will utilize patch.exe in temp location for no elevation prompt
   set(
     ZOOKEEPER_PATCH_CMD
-    ${PATCHEXE_LOCATION} --binary -p1 < ${MESOS_3RDPARTY_SRC}/zookeeper-${ZOOKEEPER_VERSION}.patch)
+    ${PATCHEXE_LOCATION} -p1 < ${MESOS_3RDPARTY_SRC}/zookeeper-${ZOOKEEPER_VERSION}.patch)
 
   VS_BUILD_CMD(
     ZOOKEEPER
     ${ZOOKEEPER_C_ROOT}/zookeeper-vs2015.sln
     ${CMAKE_BUILD_TYPE}
-    "zookeeper")
+    ${ZOOKEEPER_C_ROOT}
+    "zookeeper"
+    )
 
   set(ZOOKEEPER_CONFIG_CMD  ${CMAKE_NOOP})
   set(ZOOKEEPER_INSTALL_CMD ${CMAKE_NOOP})

http://git-wip-us.apache.org/repos/asf/mesos/blob/94332ffd/3rdparty/cmake/Mesos3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/cmake/Mesos3rdpartyConfigure.cmake b/3rdparty/cmake/Mesos3rdpartyConfigure.cmake
index 0c80fb8..aaf1651 100755
--- a/3rdparty/cmake/Mesos3rdpartyConfigure.cmake
+++ b/3rdparty/cmake/Mesos3rdpartyConfigure.cmake
@@ -29,18 +29,26 @@ endif (NOT WIN32)
 
 # Intermediate convenience variables for oddly-structured directories.
 set(ZOOKEEPER_C_ROOT ${ZOOKEEPER_ROOT}/src/c)
-set(ZOOKEEPER_LIB    ${ZOOKEEPER_ROOT}-lib/lib)
+set(ZOOKEEPER_LIB    ${ZOOKEEPER_ROOT}/src/c)
 
 # Convenience variables for include directories of third-party dependencies.
 set(ZOOKEEPER_INCLUDE_GENDIR ${ZOOKEEPER_C_ROOT}/generated)
 set(ZOOKEEPER_INCLUDE_DIR ${ZOOKEEPER_C_ROOT}/include)
 
 # Convenience variables for `lib` directories of built third-party dependencies.
-set(ZOOKEEPER_LIB_DIR ${ZOOKEEPER_LIB}/lib)
+if (NOT WIN32)
+  set(ZOOKEEPER_LIB_DIR ${ZOOKEEPER_LIB})
+else (NOT WIN32)
+  set(ZOOKEEPER_LIB_DIR ${ZOOKEEPER_LIB}/x64/${CMAKE_BUILD_TYPE})
+endif (NOT WIN32)
 
 # Convenience variables for "lflags", the symbols we pass to CMake to generate
 # things like `-L/path/to/glog` or `-lglog`.
-set(ZOOKEEPER_LFLAG  zookeeper_mt)
+if (NOT WIN32)
+  set(ZOOKEEPER_LFLAG ${ZOOKEEPER_LIB}/lib/libzookeeper_mt.a)
+else (NOT WIN32)
+  set(ZOOKEEPER_LFLAG zookeeper)
+endif (NOT WIN32)
 
 # Configure Windows use of the GNU patch utility;
 # we attempt to find it in its default location,

http://git-wip-us.apache.org/repos/asf/mesos/blob/94332ffd/3rdparty/zookeeper-06d3f3f.patch
----------------------------------------------------------------------
diff --git a/3rdparty/zookeeper-06d3f3f.patch b/3rdparty/zookeeper-06d3f3f.patch
index 8f8f72c..56480d5 100644
--- a/3rdparty/zookeeper-06d3f3f.patch
+++ b/3rdparty/zookeeper-06d3f3f.patch
@@ -1,3 +1,88 @@
+diff --git a/src/c/zookeeper.vcxproj b/src/c/zookeeper.vcxproj
+index be4ad9a..59f9172 100644
+--- a/src/c/zookeeper.vcxproj
++++ b/src/c/zookeeper.vcxproj
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="utf-8"?>
+-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+   <ItemGroup Label="ProjectConfigurations">
+     <ProjectConfiguration Include="Debug|Win32">
+       <Configuration>Debug</Configuration>
+@@ -22,24 +22,25 @@
+     <ProjectGuid>{5754FB2B-5EA5-4988-851D-908CA533A626}</ProjectGuid>
+     <RootNamespace>zookeeper</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
++    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+-    <PlatformToolset>v120</PlatformToolset>
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+-    <PlatformToolset>v120</PlatformToolset>
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+-    <PlatformToolset>v120</PlatformToolset>
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <CharacterSet>MultiByte</CharacterSet>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+-    <PlatformToolset>v120</PlatformToolset>
++    <ConfigurationType>StaticLibrary</ConfigurationType>
++    <PlatformToolset>v140</PlatformToolset>
+     <CharacterSet>MultiByte</CharacterSet>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+@@ -80,10 +81,10 @@
+     <ClCompile>
+       <Optimization>Disabled</Optimization>
+       <AdditionalIncludeDirectories>./include;./generated;./hashtable;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ZOOKEEPER_EXPORTS;DLL_EXPORT;THREADED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ZOOKEEPER_EXPORTS;THREADED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+       <MinimalRebuild>true</MinimalRebuild>
+       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+       <PrecompiledHeader />
+       <WarningLevel>Level3</WarningLevel>
+       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+@@ -104,7 +105,7 @@
+       <AdditionalIncludeDirectories>./include;./generated;./hashtable;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ZOOKEEPER_EXPORTS;DLL_EXPORT;THREADED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+       <PrecompiledHeader>
+       </PrecompiledHeader>
+       <WarningLevel>Level3</WarningLevel>
+@@ -124,7 +125,7 @@
+     <ClCompile>
+       <AdditionalIncludeDirectories>./include;./generated;./hashtable;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ZOOKEEPER_EXPORTS;DLL_EXPORT;THREADED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+       <PrecompiledHeader />
+       <WarningLevel>Level3</WarningLevel>
+       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -144,7 +145,7 @@
+     <ClCompile>
+       <AdditionalIncludeDirectories>./include;./generated;./hashtable;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ZOOKEEPER_EXPORTS;DLL_EXPORT;THREADED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+       <PrecompiledHeader>
+       </PrecompiledHeader>
+       <WarningLevel>Level3</WarningLevel>
 diff --git a/src/c/zookeeper-vs2015.sln b/src/c/zookeeper-vs2015.sln
 new file mode 100644
 index 0000000..44d738f

http://git-wip-us.apache.org/repos/asf/mesos/blob/94332ffd/cmake/MesosConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/MesosConfigure.cmake b/cmake/MesosConfigure.cmake
index 9a4fdb5..0913538 100755
--- a/cmake/MesosConfigure.cmake
+++ b/cmake/MesosConfigure.cmake
@@ -57,6 +57,7 @@ if (WIN32)
       MESOS
       ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.sln
       ${CMAKE_BUILD_TYPE}
+      ""
       "")
 
   string(REPLACE ";" " " MESOS_BUILD_CMD "${MESOS_BUILD_CMD}")

http://git-wip-us.apache.org/repos/asf/mesos/blob/94332ffd/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a62042f..0832f1e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -338,6 +338,8 @@ if (LINUX)
   set(MESOS_SRC ${MESOS_SRC} ${LINUX_SRC})
 endif (LINUX)
 
+add_definitions(-DUSE_STATIC_LIB)
+
 # INCLUDE DIRECTIVES FOR MESOS LIBRARY (generates, e.g., -I/path/to/thing
 # on Linux).
 #########################################################################
@@ -350,7 +352,7 @@ link_directories(${AGENT_LIB_DIRS})
 
 # THE MESOS LIBRARY (generates, e.g., libmesos.so, etc., on Linux).
 ###################################################################
-add_library(${MESOS_TARGET} ${MESOS_SRC})
+add_library(${MESOS_TARGET} STATIC ${MESOS_SRC})
 set_target_properties(
   ${MESOS_TARGET} PROPERTIES
   VERSION ${MESOS_PACKAGE_VERSION}