oranges_generate_standard_headers

include (OrangesGenerateStandardHeaders)

View the full docs for this module.

oranges_generate_standard_headers (<targetName>
                                  [BASE_NAME <baseName>]
                                  [HEADER <mainHeaderName>] | [NO_AGGREGATE_HEADER]
                                  [FEATURE_TEST_LANGUAGE <lang>]
                                  [EXPORT_HEADER <exportHeaderName>]
                                  [PLATFORM_HEADER <platformHeaderName>]
                                  [INSTALL_COMPONENT <componentName>] [REL_PATH <installRelPath>]
                                  [SCOPE <PUBLIC|PRIVATE|INTERFACE>]
                                  [SOURCE_GROUP_NAME <groupName>])

This command calls oranges_generate_export_header() and oranges_generate_platform_header(), then generates another header named <mainHeaderName> that includes the other generated headers.

Options:

BASE_NAME

Prefix used for all macros defined in generated header files, and the build type macros. Defaults to <targetName>.

HEADER

Name of the aggregate header file that will include all the other generated headers. Defaults to <baseName>_generated.h.

Mutually exclusive with: NO_AGGREGATE_HEADER

NO_AGGREGATE_HEADER

If specified, no “aggregate” header including the other generated headers will be created.

Mutually exclusive with: HEADER

FEATURE_TEST_LANGUAGE

The language passed to oranges_generate_platform_header() to do any compiler-specific platform introspection. Defaults to the value of the PLAT_DEFAULT_TESTING_LANGUAGE variable.

EXPORT_HEADER

Name of the export header to be generated. Defaults to <baseName>_export.h.

PLATFORM_HEADER

Name of the platform header to be generated. Defaults to <baseName>_platform.h.

NO_BUILD_TYPE_MACROS

If specified, build type macros will not be added to the target. The default behavior is to call oranges_add_build_type_macros() to add compile definitions describing the build type to the target.

INSTALL_COMPONENT

The name of an install component for all generated files to be added to. This command will not create the install component.

REL_PATH

Path below CMAKE_INSTALL_INCLUDEDIR where the generated header will be installed to. Defaults to <targetName>.

SCOPE

The scope with which the build type macros and generated files will be added to the target. Defaults to INTERFACE for interface library targets, PRIVATE for executables, and PUBLIC for all other target types.

SOURCE_GROUP_NAME

If specified, then the generated files will be grouped into a source folder using the source_group() command. The group will be named <groupName>. If this argument is not specified, the generated files will not be grouped.

See also

Module OrangesGeneratePlatformHeader

This module provides platform- and compiler-specific macro definitions

Module OrangesGenerateExportHeader

This module provides symbol visibility control utilities