summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-05 13:30:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-05 13:31:06 (GMT)
commit20e5f7a9c97b5311bda969062c659858c9c896c8 (patch)
tree823e374a4c3edd2e7c8957732aa33e895b021f3b /Modules
parent4defa6c21c0a483db229eb1ddbcbe17002722b21 (diff)
parent1561748496b10bc74adc731fd1d5e7c733034cba (diff)
downloadCMake-20e5f7a9c97b5311bda969062c659858c9c896c8.zip
CMake-20e5f7a9c97b5311bda969062c659858c9c896c8.tar.gz
CMake-20e5f7a9c97b5311bda969062c659858c9c896c8.tar.bz2
Merge topic 'ExternalProject-command'
15617484 ExternalProject: Prevent COMMAND from being treated as a true keyword Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1178
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index d92eb5f..912c5ac 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -870,6 +870,14 @@ foreach(line IN LISTS lines)
set(_ep_keyword_sep)
elseif("${line}" MATCHES "^ +``([A-Z0-9_]+) [^`]*``$")
set(_ep_key "${CMAKE_MATCH_1}")
+ # COMMAND should never be included as a keyword,
+ # for ExternalProject_Add(), as it is treated as a
+ # special case by argument parsing as an extension
+ # of a previous ..._COMMAND
+ if("x${_ep_key}x" STREQUAL "xCOMMANDx" AND
+ "x${_ep_func}x" STREQUAL "xExternalProject_Addx")
+ continue()
+ endif()
#message(" keyword [${_ep_key}]")
string(APPEND _ep_keywords_${_ep_func}
"${_ep_keyword_sep}${_ep_key}")