
If you specify a regular expression with the Trace all the dependencies for a source file including system files
#Cmake set variable superset list of files code
Used for tracing source code dependencies. This command controls the regular expression that is The include_regular_expression command also relates toĭependencies. Of the targets is a custom target (see Add Custom Command section). Used to specify inter-target dependencies between targets where at least one The add_dependencies command is typically For example, CMake willĪutomatically create a dependency for an executable target that depends on a CMake automatically creates dependenciesīetween targets when it can determine them. This section will discussĪ few of these commands and when they are useful.įirst, consider the add_dependencies command which creates aĭependency between two targets. Typically used in writing CMakeLists files. There are a few commands that can be very useful, but are not That a macro, unlike a function, is expanded in place and therefore cannot The return command returns from a function, directory or file. Inside your macro, you can use the foreach command to ARGV (as opposed to ARGV0,ĪRGV1, etc) is a list of all the arguments to the macro, whileĪRGN is a list of all the arguments after the formalĪrguments.

If you want to process the arguments as a list, use theĪRGV and ARGN variables. They are in this example, or by referencing ARGV0 andĪRGV1. These required arguments can be referenced by name, as In this example, the two required arguments are TEST andĬOMMENT. For example:įoreach( tfile TestAnisotropicDiffusion2D TestButterworthLowPass TestButterworthHighPass TestCityBlockDistance TestConvolve ) add_test( $ "Unable to find library foo" ) Separating on semicolons within the value. Literal) and is automatically expanded into zero-or-more arguments by Starts in any character other than a double quote (later double quotes are Using bracket arguments for arguments that require escaping, see theĬmake-language manual. Quotes contained inside the value must be escaped with a backslash. In a double quote (“) and always represents exactly one argument.


CommandĪrguments may be either quoted or unquoted. Multiple lines as long as the command name and the opening parenthesis are onĬMake command arguments are space separated and case sensitive. Tabs) is ignored except to separate arguments. It is consideredīest practice to use lowercase commands. See theĬMake is no longer case sensitive to command names, so where you seeĬommand, you could use COMMAND or Command instead. The order that it appears in the CMakeLists file. Separated arguments, and a closing parenthesis. A command consists of the command name, opening parenthesis, whitespace
