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 2015/09/28 01:27:44 UTC

[05/20] mesos git commit: CMake: Added `CMAKE_NOOP` to common definitions file.

CMake: Added `CMAKE_NOOP` to common definitions file.

Original review: https://reviews.apache.org/r/37273

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


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

Branch: refs/heads/master
Commit: fa481e433f8dfdcc991520af7e8d483670790757
Parents: 3396a8e
Author: haosdent huang <ha...@gmail.com>
Authored: Sun Sep 27 15:41:18 2015 -0700
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Sun Sep 27 16:05:49 2015 -0700

----------------------------------------------------------------------
 CMakeLists.txt     |  3 ++-
 cmake/Common.cmake | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/fa481e43/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b6f4af..4b684f6 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,8 +40,9 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/cmake)
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/cmake/macros)
 
 # Macros.
-include(PatchCommand)
+include(Common)
 include(External)
+include(PatchCommand)
 
 # Configuration.
 include(MesosConfigure)

http://git-wip-us.apache.org/repos/asf/mesos/blob/fa481e43/cmake/Common.cmake
----------------------------------------------------------------------
diff --git a/cmake/Common.cmake b/cmake/Common.cmake
new file mode 100644
index 0000000..76b2a67
--- /dev/null
+++ b/cmake/Common.cmake
@@ -0,0 +1,25 @@
+# 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.
+
+###############################################################
+# Exports a variable CMAKE_NOOP as noop operation.
+#
+# NOTE: This is especially important when building third-party libraries on
+# Windows; the default behavior of `ExternalProject` is to try to assume that
+# third-party libraries can be configured/built/installed with CMake, so in
+# cases where this isn't true, we have to "trick" CMake into skipping those
+# steps by giving it a noop command to run instead.
+set(CMAKE_NOOP ${CMAKE_COMMAND} -E echo)