From c9b301cd7145883611a4ae7f7c09c245581261c2 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 15 Sep 2014 14:49:25 -0400 Subject: [PATCH] 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. --- Modules/ExternalProject.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index f8c996e7a..f5ed9483d 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)