summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2014-09-15 18:49:25 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-15 19:56:37 (GMT)
commitc9b301cd7145883611a4ae7f7c09c245581261c2 (patch)
tree1565d628cb970a6ed4d822c914107bb19b705c42 /Modules/ExternalProject.cmake
parent0f2defba7d89aced3b667c6afe031abdfd152540 (diff)
downloadCMake-c9b301cd7145883611a4ae7f7c09c245581261c2.zip
CMake-c9b301cd7145883611a4ae7f7c09c245581261c2.tar.gz
CMake-c9b301cd7145883611a4ae7f7c09c245581261c2.tar.bz2
ExternalProject: Fix CMP0054 warning in _ep_parse_arguments
Fix the CMP0054 warning: CMake Warning (dev) at .../Modules/ExternalProject.cmake:242 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Quoted keywords like "COMMAND" will no longer be interpreted as keywords when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): .../Modules/ExternalProject.cmake:1938 (_ep_parse_arguments) CMakeLists.txt:5 (ExternalProject_Add) by avoiding a reference to "${key}" or "COMMAND" in quotes.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index f8c996e..f5ed948 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -240,7 +240,7 @@ function(_ep_parse_arguments f name ns args)
set(is_value 1)
if(arg MATCHES "^[A-Z][A-Z0-9_][A-Z0-9_]+$" AND
- NOT ((arg STREQUAL "${key}") AND (key STREQUAL "COMMAND")) AND
+ NOT (("x${arg}x" STREQUAL "x${key}x") AND ("x${key}x" STREQUAL "xCOMMANDx")) AND
NOT arg MATCHES "^(TRUE|FALSE)$")
if(_ep_keywords_${f} AND arg MATCHES "${_ep_keywords_${f}}")
set(is_value 0)