This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Ignore hidden/metadata files when adding lit check-* testsuites
Needs ReviewPublic

Authored by eladcohen on Jan 11 2017, 4:37 AM.

Details

Summary

When we have hidden/metadata files (for example .svn dirs) under the test dirs, cmake creates a bloated Makefile with tons of fake check-.* targets which increases build time.

Diff Detail

Event Timeline

eladcohen updated this revision to Diff 83955.Jan 11 2017, 4:37 AM
eladcohen retitled this revision from to [CMake] Ignore hidden/metadata files when adding lit check-* testsuites.
eladcohen updated this object.
eladcohen added reviewers: vladisld, bogner.
eladcohen added a subscriber: llvm-commits.
mgorny added inline comments.Jan 17 2017, 2:06 PM
cmake/modules/AddLLVM.cmake
1216

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.

eladcohen added inline comments.Jan 18 2017, 1:34 AM
cmake/modules/AddLLVM.cmake
1216

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?

eladcohen updated this revision to Diff 84807.EditedJan 18 2017, 1:35 AM

Fixed Michał's comment

mgorny added inline comments.Jul 26 2017, 4:47 AM
cmake/modules/AddLLVM.cmake
1219

Why the second slash? If you're trying to escape the ., then it shouldn't be necessary since it's in []. With the first one, I think you use \\ for the literal backwards slash but please test how CMake handles it.