-
Notifications
You must be signed in to change notification settings - Fork 20
excludes
Home > [Scripting Reference](Scripting Reference) > excludes
The excludes function removes files, added with the files function, from a project.
#!lua
excludes { "file_list" }
If a project includes multiple calls to excludes the lists are concatenated.
Files may be set on the solution, project, and configuration level. However, only project-level file lists are currently supported.
file_list specifies one or more file patterns, separated by commas. File paths should be specified relative to the location of the script file. File patterns may contain the * wildcard to match against files in the current directory, or the ** wildcard to perform a recursive match.
Examples
Add all C files in a directory, and then exclude a specific file.
#!lua
files { "*.c" }
excludes { "a_file.c" }
Add an entire directory tree of C files, and then exclude one particular directory.
#!lua
files { "**.c" }
excludes { "tests/*.c" }