浏览代码

ExternalProject: Add missing COMMAND keyword

Commit f67139ae added running a verify script in between running
the download and extract scripts. Since then, it has always been
missing the COMMAND keyword added in this commit.

It worked anyway (semi-accidentally) by running a command line like:

  cmake -P script1.cmake cmake -P script2.cmake

CMake, when running -P scripts on the command line, runs them in order,
and apparently ignores spurious arguments in between (the middle "cmake"
in the above example) and so, all appeared to work as intended.

This commit adds the missing keyword and the commands that run are
now two separate sequential cmake invocations like:

  cmake -P script1.cmake
  cmake -P script2.cmake

...which was the original intent of commit f67139ae
David Cole 13 年之前
父节点
当前提交
64818c1077
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Modules/ExternalProject.cmake

+ 2 - 1
Modules/ExternalProject.cmake

@@ -1141,7 +1141,8 @@ function(_ep_add_download_command name)
         set(comment "Performing download step (verify and extract) for '${name}'")
         set(comment "Performing download step (verify and extract) for '${name}'")
       endif()
       endif()
       _ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${md5}")
       _ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${md5}")
-      list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake)
+      list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake
+        COMMAND)
       _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${name}" "${file}" "${source_dir}")
       _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${name}" "${file}" "${source_dir}")
       list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)
       list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)
     endif()
     endif()