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

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 14:33:52 PST 2017


Elad Cohen via Phabricator <reviews at reviews.llvm.org> writes:
> ================
> 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?

IIRC I wrote it like this because this was before we bumped the cmake
min version and it was pretty awkward to do a better check. Tightening
the check up to make sure it's actually a directory called Inputs or
Outputs would make a lot of sense, if you feel like fiddling with it.


More information about the llvm-commits mailing list