Below is an alphabetical index of the tags that are recognized followed by the descriptions of the tags grouped by category. The configuration options can be divided into several categories. You can also include part of a configuration file from another configuration file using a tag as = my_config_dir Environment variables can be expanded using the pattern $(ENV_VARIABLE_NAME). Multiple lines can be concatenated by inserting a backslash (\) as the last character of a line. If the value should contain one or more blanks it must be surrounded by quotes ("."). For options that take a list as their argument, the = operator can be used instead of = to append new values to the list. If the same tag is assigned more than once, the last assignment overwrites any earlier assignment. Each statement consists of a TAG_NAME written in capitals, followed by the = character and one or more values. The file essentially consists of a list of assignment statements. Comments begin with the # character and end at the end of the line. Comments may be placed anywhere within the file (except within quotes). The statements in the file are case-sensitive. The file may contain tabs and newlines for formatting purposes. Doxygen manual: Configuration ConfigurationĪ configuration file is a free-form ASCII text file with a structure that is similar to that of a Makefile, default name Doxyfile. Project-specific CMake modules (such as various FindPackage.cmake files) are placed in a modules/ directory in the project root and then added to CMAKE_MODULE_PATH in the top-level CMakeLists.txt file: set ( CMAKE_MODULE_PATH $ ) a. When using target_link_libraries (), prefer to specify the PUBLIC|PRIVATE|INTERFACE distinction explicitly. Prefer to use the new, non-global CMake workflow, so target_include_directories (), target_compile_definitions () and target_compile_options () instead of include_directories (), add_definitions () and modifying the global CMAKE_CXX_FLAGS. Source and header lists should be ordered alphabetically, subdirectories last, preferably separated by a single empty line. set ()) have trailing parenthesis on the same line as last parameter, not on separate line: set ( MyUtilityLibrary_SRCS Filesystem.cpp IniParser.cpp Utility.cpp ) variable holding all sources for target MyUtilityLibrary will be named MyUtilityLibrary_SRCS. Variables are mostly uppercase with underscores between words, except for variables with direct relation to any named target - then they have the target name as prefix with no case change, followed with underscore, the rest of variable name is uppercase, e.g. add_executable (), set ()) are lowercase, keywords (e.g. CMake codeĪll CMake functions and macros (e.g. The text (and code) should be wrapped around 80th column to make it possible to view more files alongside each other without breaking their layout, long single-line statements are allowed unless it hurts readability. Sentences are always separated with only one space. Logic sections of the code and documentation paragraphs are always separated with not more than one empty line to save vertical space. If CR LF line endings are required for particular files, they have to be explicitly listed in. Files in the repository should be with LF line ending by default. Trailing whitespaces are not permitted (and you should set up your Git installation to warn about that).
0 Comments
Leave a Reply. |