[PATCH] D28558: [CMake] Ignore hidden/metadata files when adding lit check-* testsuites

Elad Cohen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 01:34:49 PST 2017

eladcohen added inline comments.

Comment at: cmake/modules/AddLLVM.cmake:1218
       string(FIND ${lit_suite} Output is_output)
-      if (NOT (is_inputs EQUAL -1 AND is_output EQUAL -1))
+      string(COMPARE EQUAL ${lit_suite} "^[.].*" is_hidden)
+      if (NOT (is_inputs EQUAL -1 AND is_output EQUAL -1 AND is_hidden EQUAL -1))
mgorny wrote:
> Any reason not to just use literal `${lit_suite} MATCHES "^[.]"` in if?
> The Inputs/Output check could be made nicer too, I guess; but only if you want to play with them. I'm pretty sure the current version would match `Inputs` somewhere in path or filename.
Makes sense, I'll change it to an `if(var MATCHES regex)` - thanks!

About the Inputs/Output - I rather not change this, I'm really no CMake expert. Maybe @bogner knows if the intention was to actually match `Inputs` anywhere in path or filename?


More information about the llvm-commits mailing list