You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2018/05/18 17:46:43 UTC

mesos git commit: Windows: Fixed cURL copy command to run only once.

Repository: mesos
Updated Branches:
  refs/heads/master c020a130a -> 0c8b81719


Windows: Fixed cURL copy command to run only once.

Previously this used `add_custom_target` on the `ExternalProject_Add`
target, `${CURL_TARGET}`. Because this is phony target, it caused the
copy operation to always run. By switching to
`ExternalProject_Add_Step`, we can change it to depend on the build
sub-step of the `ExternalProject_Add` logic, ensuring it runs
immediately after cURL is built, but not again.

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


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

Branch: refs/heads/master
Commit: 0c8b81719450b47e9317ad5d119784bf6f144b63
Parents: c020a13
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Fri May 18 10:11:44 2018 -0700
Committer: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Committed: Fri May 18 10:11:44 2018 -0700

----------------------------------------------------------------------
 3rdparty/CMakeLists.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0c8b8171/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 3837a31..ecb6946 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -739,8 +739,11 @@ if (WIN32)
   # This copies the file `curl.exe` from the `3rdparty` build folder to
   # `build/src`, next to the other produced executables. This is necessary for
   # code that shells out to cURL on Windows.
-  add_custom_command(TARGET ${CURL_TARGET} POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:curl> ${CMAKE_BINARY_DIR}/src/curl.exe)
+  #
+  # TODO(andschwa): Change this to an `INSTALL` step.
+  ExternalProject_Add_Step(${CURL_TARGET} copy
+    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:curl> ${CMAKE_BINARY_DIR}/src/curl.exe
+    DEPENDEES build)
 else ()
   find_package(CURL REQUIRED)
   add_library(libcurl SHARED IMPORTED)