URL中带有分号的ExternalProject_Add

时间:2018-07-24 04:49:39

标签: cmake external-project

我试图在URL参数中使用ExternalProject_Add和分号,如下所示:

ExternalProject_Add(opencascade
    URL https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_3_0;sf=zip
    URL_HASH SHA1=52a559b02571fe7b4353242901b8da08907bd709)

但是,随着我不断收到错误,CMake似乎正在将其扩展为列表:

CMake Error at /usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/ExternalProject.cmake:2450 (message):
  At least one entry of URL is a path (invalid in a list)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/ExternalProject.cmake:3100 (_ep_add_download_command)
  ...

当我删除分号时,错误消失了,但是显然URL不正确。我尝试用反斜杠转义分号或引用字符串,但仍然存在相同的问题。

0 个答案:

没有答案