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 2017/09/03 12:51:50 UTC
[28/42] mesos git commit: CMake: Removed some CMake helper modules.
CMake: Removed some CMake helper modules.
`External` and `PatchCommand` were consolidated to `3rdparty`, and
`VsBuildCommand` has already been deprecated and is unused.
Review: https://reviews.apache.org/r/61514/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b4933f15
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b4933f15
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b4933f15
Branch: refs/heads/master
Commit: b4933f15c6dbb3f9ad458a56d64ef2c3ea7705f9
Parents: bf6ad1f
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Sat Sep 2 20:03:28 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Sun Sep 3 05:51:08 2017 -0700
----------------------------------------------------------------------
3rdparty/libprocess/cmake/macros/External.cmake | 80 -----------------
.../libprocess/cmake/macros/PatchCommand.cmake | 29 ------
.../libprocess/cmake/macros/VsBuildCommand.bat | 94 --------------------
3 files changed, 203 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b4933f15/3rdparty/libprocess/cmake/macros/External.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/macros/External.cmake b/3rdparty/libprocess/cmake/macros/External.cmake
deleted file mode 100644
index 5bc51bd..0000000
--- a/3rdparty/libprocess/cmake/macros/External.cmake
+++ /dev/null
@@ -1,80 +0,0 @@
-# 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.
-
-###############################################################
-# EXTERNAL defines a few variables that make it easy for us to track the
-# directory structure of a dependency. In particular, if our library's name is
-# boost, we will define the following variables:
-#
-# BOOST_VERSION (e.g., 1.53.0)
-# BOOST_TARGET (a target folder name to put dep in e.g., boost-1.53.0)
-# BOOST_CMAKE_ROOT (where to have CMake put the uncompressed source, e.g.,
-# build/3rdparty/boost-1.53.0)
-# BOOST_ROOT (where the code goes in various stages of build, e.g.,
-# build/.../boost-1.53.0/src, which might contain folders
-# build-1.53.0-build, -lib, and so on, for each build step
-# that dependency has)
-function(EXTERNAL
- LIB_NAME
- LIB_VERSION
- BIN_ROOT)
-
- string(TOUPPER ${LIB_NAME} LIB_NAME_UPPER)
-
- # Names of variables we will set in this function.
- set(VERSION_VAR ${LIB_NAME_UPPER}_VERSION) # e.g., BOOST_VERSION
- set(TARGET_VAR ${LIB_NAME_UPPER}_TARGET) # e.g., BOOST_TARGET
- set(CMAKE_ROOT_VAR ${LIB_NAME_UPPER}_CMAKE_ROOT) # e.g., BOOST_CMAKE_ROOT
- set(ROOT_VAR ${LIB_NAME_UPPER}_ROOT) # e.g., BOOST_ROOT
-
- # Generate data that we will put in the above variables.
- # NOTE: bundled packages are untar'd into the BIN_ROOT, which is why we're
- # pointing the source root into BIN_ROOT rather than SRC_ROOT.
- # TODO(hausdorff): SRC_DATA doesn't work for HTTP, LIBEV, GMOCK, or GTEST.
- set(VERSION_DATA ${LIB_VERSION})
- set(TARGET_DATA ${LIB_NAME}-${VERSION_DATA})
- set(CMAKE_ROOT_DATA ${BIN_ROOT}/${TARGET_DATA})
- set(ROOT_DATA ${CMAKE_ROOT_DATA}/src/${TARGET_DATA})
-
- # Finally, EXPORT THE ABOVE VARIABLES. We take the data variables we just
- # defined, and export them to variables in the parent scope.
- #
- # NOTE: The "export" step is different from the "define the data vars" step
- # because an expression like ${VERSION_VAR} will evaluate to
- # something like "BOOST_VERSION", not something like "1.53.0". That
- # is: to get the version in the parent scope we would do something
- # like ${BOOST_VERSION}, which might evaluate to something like
- # "1.53.0". So in this function, if you wanted to generate (e.g.) the
- # target variable, it is not sufficient to write
- # "${LIB_NAME}-${VERSION_VAR}", because this would result in
- # something like "boost-BOOST_VERSION" when what we really wanted was
- # "boost-1.53.0". Hence, these two steps are different.
- set(${VERSION_VAR} # e.g., 1.53.0
- ${VERSION_DATA}
- PARENT_SCOPE)
-
- set(${TARGET_VAR} # e.g., boost-1.53.0
- ${TARGET_DATA}
- PARENT_SCOPE)
-
- set(${CMAKE_ROOT_VAR} # e.g., build/3rdparty/boost-1.53.0
- ${CMAKE_ROOT_DATA}
- PARENT_SCOPE)
-
- set(${ROOT_VAR} # e.g., build/.../boost-1.53.0/src
- ${ROOT_DATA}
- PARENT_SCOPE)
-endfunction()
http://git-wip-us.apache.org/repos/asf/mesos/blob/b4933f15/3rdparty/libprocess/cmake/macros/PatchCommand.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/macros/PatchCommand.cmake b/3rdparty/libprocess/cmake/macros/PatchCommand.cmake
deleted file mode 100644
index 12ee3f1..0000000
--- a/3rdparty/libprocess/cmake/macros/PatchCommand.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-
-##############################################################
-# PATCH_CMD generates a patch command for those dependencies that need it. For
-# example, when the rebundled version of GLOG needs to be patched, we would run
-# this command.
-function(PATCH_CMD patch_filename patch_cmd_varname)
- # CMake does not appear to have a good way for macro functions to return
- # values, so here we assign the patch command to a variable in the
- # PARENT_SCOPE. (The name of the variable to assign to in the parent scope
- # is passed in as a parameter to the macro function.)
- set (${patch_cmd_varname}
- test ! -e ${patch_filename} || patch -p1 < ${patch_filename}
- PARENT_SCOPE)
-endfunction()
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/mesos/blob/b4933f15/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat b/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat
deleted file mode 100644
index 8d8f7c6..0000000
--- a/3rdparty/libprocess/cmake/macros/VsBuildCommand.bat
+++ /dev/null
@@ -1,94 +0,0 @@
-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
-
-REM Parse command line params.
-for /f "tokens=1-3*" %%A in ("%*") do (
- set SOLUTION_FILE=%%A
- set CONFIGURATION=%%B
- set PROJECTS_ROOT=%%C
- set PROJECTS=%%D
-)
-
-set PLATFORM=x64
-setlocal EnableDelayedExpansion
-setlocal EnableExtensions
-
-REM Get Visual Studio 2015 install directory.
-set VS2015_KEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0
-set VS2015_INSTALLDIR_VALUE=InstallDir
-
-for /F "skip=2 tokens=1,2*" %%A ^
-in ('REG QUERY %VS2015_KEY% /v %VS2015_INSTALLDIR_VALUE% 2^>nul') do (
- set VS2015_DIR=%%C..\..
-)
-
-REM Check if Visual Studio 2015 is installed.
-if defined VS2015_DIR (
- set SOLUTION_VER=12.00
- 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 (
- 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%
-)
-
-if not "%PROJECTS%" == "" (
- set PROJECTS_TARGET=/t:%PROJECTS: =;%
-)
-
-msbuild ^
- %SOLUTION_FILE% %PROJECTS_TARGET% ^
- /p:Configuration=%CONFIGURATION%;Platform=%PLATFORM% ^
- /p:PlatformTarget=%PLATFORM% ^
- /p:RuntimeLibrary=MT_StaticDebug
-
-:end
-exit /b
\ No newline at end of file