
Nested unquoted parentheses in the arguments mustīalance. Separated_arguments ::= separation+ argument? |Ĭommand names are case-insensitive. Note that any source file line not inside Command Arguments or a Bracket Comment can endĪ command invocation is a name followed by paren-enclosed arguments separated byĬommand_invocation ::= space* identifier space* '(' arguments ')'Īrguments ::= argument? separated_arguments* ( bracket_comment| space)* line_ending line_ending ::= line_comment? newline space ::= Newlines and optionally spaces and Comments:įile_element ::= command_invocation line_ending | Support source files encoded in UTF-8 on Windows (using UTF-16 to call system APIs).įurthermore, CMake 3.0 and above allow a leading UTF-8 Byte-Order Mark in source files.Ī CMake Language source file consists of zero or more Command Invocations separated by Platforms with system APIs supporting this encoding. Note that the implementation is 8-bit clean so source files may be encoded as UTF-8 on Newlines may be encoded as either \n or \r\n but will be Location(s) in the CMAKE_MODULE_PATH variable.Ī CMake Language source file may be written in 7-bit ASCII text for maximum portabilityĪcross all supported platforms. Project source trees may also provide their own modules and specify their
#Cmake file manual#
See theĬmake-modules(7) manual page for documentation of modules included with the CMakeĭistribution. cmake source file in the scope of the including context.
#Cmake file code#
It does notĪllow CMake commands that define build targets or actions.ĬMake Language code in either Directories or Scripts may use the include() command to loadĪ.

The given CMake Language source file and does not generate a build system. cmake source file may be processed in script mode by using theĬmake(1) command-line tool with the -P option. Processed CMake generates a corresponding directory in the build tree to act as theĪn individual. For each source directory whose CMakeLists.txt file is Specification or use the add_subdirectory() command to add subdirectories to the build.Įach subdirectory added by the command must also contain a CMakeLists.txt file as theĮntry point to that directory. When CMake processes a project source tree, the entry point is a source file calledĬMakeLists.txt in the top-level source directory. cmake file name extension.ĬMake Language source files in a project are organized into: Provided by: cmake-data_3.5.1-1ubuntu1_allĬmake-language - CMake Language ReferenceĬMake input files are written in the "CMake Language" in source files named CMakeLists.txt
