Preprocess¶
Generating headers before anything is compiled: configuration macros, build information, and an include directory built out of a source tree.
Warning
This module depends on qmcorecmd after installation.
- qm_sync_include¶
Generate indirect reference files for header files to make the include statements more orderly. The generated file has the same timestamp as the source file.
qm_sync_include(<src> <dest> [STANDARD] [NO_STANDARD] [NO_ALL] [INCLUDE <expr> <sub> ...] [EXCLUDE <expr...>] [INSTALL_DIR <dir>] [FORCE] [VERBOSE] )
STANDARDEnable standard public-private pattern, can be forced to enable by enabling
QMSETUP_SYNC_INCLUDE_STANDARDNO_STANDARDDisable standard public-private pattern, enable it to override
QMSETUP_SYNC_INCLUDE_STANDARD
- qm_add_definition¶
Add a definition to a property scope.
qm_add_definition( <key | key=value> | <key> <value> [GLOBAL | TARGET <target> | SOURCE <file> | DIRECTORY <dir>] [PROPERTY <prop>] [CONDITION <cond...>] [STRING_LITERAL] [NO_KEYWORD] [NUMERICAL] [CLASSICAL] )
STRING_LITERALForce quotes on values
NO_KEYWORDTreat any keyword as string
NUMERICALUse 1/-1 as defined/undefined, can be forced to enable by enabling
QMSETUP_DEFINITION_NUMERICALCLASSICALUse classical definition, enable it to override
QMSETUP_DEFINITION_NUMERICAL
- qm_remove_definition¶
Remove a definition from a property scope.
qm_remove_definition(<key> [GLOBAL | TARGET <target> | SOURCE <file> | DIRECTORY <dir>] [PROPERTY <prop>] )
- qm_generate_config¶
Generate a configuration header of a property scope. If the configuration has not changed, the generated file’s timestemp will not be updated when you reconfigure it.
qm_generate_config(<file> [GLOBAL | TARGET <target> | SOURCE <file> | DIRECTORY <dir>] [PROPERTY <prop>] [PROJECT_NAME <name>] [WARNING_FILE <file>] [NO_WARNING] [NO_HASH] )
- qm_generate_build_info¶
Generate build info information header.
qm_generate_build_info(<file> [REQUIRED] [ROOT_DIRECTORY <dir>] [PREFIX <prefix>] [YEAR] [TIME] [PROJECT_NAME <name>] [WARNING_FILE <file>] [NO_WARNING] [NO_HASH] )
<file>Output file
REQUIREDAbort if there’s any error with git
ROOT_DIRECTORYRepository root directory (CMake will try to run
gitat this directory)PREFIXMacros prefix, default to the upper case of
PROJECT_NAME
Where this page comes from
The comments in cmake/modules/Preprocess.cmake, which is what to change.