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.
This commit is contained in:
Matt McCormick 2014-09-15 14:49:25 -04:00 committed by Brad King
parent 0f2defba7d
commit c9b301cd71
1 changed files with 1 additions and 1 deletions

View File

@ -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)