Skip to content
mba105 edited this page Sep 24, 2014 · 2 revisions

Home > [Scripting Reference](Scripting Reference) > excludes


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.

Applies To

Files may be set on the solution, project, and configuration level. However, only project-level file lists are currently supported.

Parameters

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" }
Clone this wiki locally