Browse Source

ExternalProject: Don't treat YES as a keyword

This ultimately won't change behavior, since YES should never be listed
in the "keywords" argument. The original code looks like a bug though,
since YES satisfies the criteria for being interpreted as a keyword, and
there is logic to short-circuit on TRUE and FALSE. Add YES to that
condition to avoid any potential confusion.
Craig Scott 1 year ago
parent
commit
91e1015722
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/ExternalProject.cmake

+ 1 - 1
Modules/ExternalProject.cmake

@@ -1341,7 +1341,7 @@ function(_ep_parse_arguments
     if(arg MATCHES "^[A-Z][A-Z0-9_][A-Z0-9_]+$" AND
         NOT (("x${arg}x" STREQUAL "x${key}x") AND
              ("x${key}x" STREQUAL "xCOMMANDx")) AND
-        NOT arg MATCHES "^(TRUE|FALSE)$")
+        NOT arg MATCHES "^(TRUE|FALSE|YES)$")
       if(arg IN_LIST keywords)
         set(is_value 0)
       endif()