excludes

The excludes function removes files, added with the files function, from a project.

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.

files { "*.c" }
excludes { "a_file.c" }

Add an entire directory tree of C files, and then exclude one particular directory.

files { "**.c" }
excludes { "tests/*.c" }