Environment API

PID_Environment

PID_Environment(AUTHOR ... YEAR ... LICENSE ... DESCRIPTION ... [OPTIONS])
declare_PID_Environment(AUTHOR ... YEAR ... LICENSE ... DESCRIPTION ... [OPTIONS])

Declare the current CMake project as a PID environment with specific meta-information passed as parameters.

Required parameters

AUTHOR <name>:The name of the author in charge of maintaining the environment.
YEAR <dates>:Reflects the lifetime of the environment, e.g. YYYY-ZZZZ where YYYY is the creation year and ZZZZ the latest modification date.
LICENSE <license name>:
 The name of the license applying to the environment. This must match one of the existing license file in the licenses directory of the workspace.
DESCRIPTION <description>:
 A short description of the environment usage and utility.
ADDRESS <url>:url of the environment’s official repository.
PUBLIC_ADDRESS <url>:
 provide a public counterpart to the repository ADDRESS

Optional parameters

INSTITUTION <institutions>:
 Define the institution(s) to which the reference author belongs.
MAIL|EMAIL <e-mail>:
 E-mail of the reference author.

Constraints

  • This function must be called in the root CMakeLists.txt file of the environment before any other call to the PID API.
  • It must be called exactly once.

Effects

Initialization of the environment internal state. After this call the package’s content can be defined.

Example

PID_Environment(
                  AUTHOR Robin Passama
                  INSTITUTION LIRMM
                  YEAR 2013-2018
                  LICENSE CeCILL
                  ADDRESS git@gite.lirmm.fr:pid/clang_toolchain.git
                  DESCRIPTION "using clang toolchain in PID"
)

PID_Environment_Author

PID_Environment_Author(AUHTOR ...[INSTITUTION ...])
add_PID_Environment_Author(AUHTOR ...[INSTITUTION ...])
Add an author to the list of authors of the environment.

Required parameters

AUTHOR <name>:The name of the author.

Optional parameters

INSTITUTION <institutions>:
 Define the institution(s) to which the author belongs to.

Constraints

  • This function must be called in the root CMakeLists.txt file of the package, after PID_Environment and before build_PID_Environment.

Effects

Add another author to the list of authors of the environment.

Example

PID_Environment_Author(AUTHOR Another Writter INSTITUTION LIRMM)

PID_Environment_Platform

PID_Environment_Platform([OPTIONS])
declare_PID_Environment_Platform([OPTIONS])

Defines for building the current environment on the given host platform that satisfies all requirements.

Optional parameters

PLATFORM <platform>:
 defines a complete specification of the target platform (e.g. x86_64_linux_stdc++11).
INSTANCE <name>:
 defines a platform instance name.
TYPE <proc>:the type of architecture for processor of the platform (e.g. x86).
ARCH <bits>:the size of processor architecture registry, 16, 32 or 64.
OS <kernel>:the OS kernel of the platform (e.g. linux).
ABI <abi>:the default c++ ABI used by the platform, 98 or 11.
DISTRIBUTION <distrib name>:
 the name of the distribution of the target platform.
DISTRIB_VERSION <version>:
 the version of the distribution of the target platform.

Constraints

  • This function must be called in the root CMakeLists.txt file of the environment after call to PID_Environment and before call to build_PID_Environment.

Example

PID_Environment_Platform(
   PLATFORM x86_64_linux_stdc++11
   DISTRIBUTION ubuntu
   DISTRIB_VERSION 18.04
)

PID_Environment_Constraints

PID_Environment_Constraints(OPTIONAL ... REQUIRED ... CHECK ...)
declare_PID_Environment_Constraints(OPTIONAL ... REQUIRED ... CHECK ...)

Declare a set of optional and/or required constraints for the configuration. These constraints are used to provide parameters to environment scripts.

Optional parameters

REQUIRED ...:the list of constraints whose value must be set before calling it.
OPTIONAL ...:the list of constraints whose value can be set or not before calling it.
IN_BINARY ...:the list of constraints whose value is can be set or not before calling it BUT that written into binaries once check is OK.
CHECK ...:the path to check script used to check if current CMAKE configuration matches constraints.

Constraints

  • This function must be called in the root CMakeLists.txt file of the environment after call to PID_Environment and before call to build_PID_Environment.

Effects

Defines parameters to the configuration process.

Example

PID_Environment_Constraints(
                  REQUIRED version
)

PID_Environment_Dependencies

PID_Environment_Dependencies(...)
declare_PID_Environment_Dependencies(...)

Define a dependency for the environment.

parameters

...:The list of environment that current environment project depends on. Each environment expression can (or must in case of required constraints) embbed constraint value definition.

Constraints

  • This function must be called in the root CMakeLists.txt file of the environment after call to PID_Environment_Platform and before call to build_PID_Environment.

Effects

Defines parameters to the configuration process.

Example

PID_Environment_Dependencies(gcc_toolchain)

PID_Environment_Solution

PID_Environment_Solution([CONFIGURE ...] [FILTERS])
declare_PID_Environment_Solution(CONFIGURE ... [FILTERS])

Define a solution to configure the environment for the current host platform.

Optional parameters

CONFIGURE ...:the path to the script file defining how to configure the build tools used by the environment.
HOST:This filter This is a filter for applying the solution. The solution will apply only if target platform matches host platform.
DISTRIBUTION ...:
 This is a filter for applying the solution. The solution will apply only if host is of same distribution.
DISTRIB_VERSION ...:
 This is a filter for applying the solution. The solution will apply only if host is of same version of distribution (you must also use DISTRIBUTION filter).
PLATFORM ...:This is a filter for applying the solution. The solution will apply only if host exactly matches the given platform. To be more selective use a combination of ARCH, TYPE, OS, ABI keywords
ARCH ...:This is a filter for applying the solution. The solution will apply only if host has given processor architecture type (e.g. x86).
TYPE ...:This is a filter for applying the solution. The solution will apply only if host has given processor architecture register size (e.g. 32).
OS ...:This is a filter for applying the solution. The solution will apply only if host runs the given kernel.
ABI ...:This is a filter for applying the solution. The solution will apply only if host default C++ ABI is 98 or 11.

Constraints

  • This function must be called in the root CMakeLists.txt file of the environment after call to PID_Environment and before call to build_PID_Environment.

Effects

Defines parameters to the configuration process.

Example

PID_Environment_Solution(OS linux DISTRIBUTION ubuntu CHECK ubuntu/check.cmake)

build_PID_Environment

build_PID_Environment()
Configure PID environment according to previous information.

Constraints

  • This function must be the last one called in the root CMakeList.txt file of the environment.

Effects

This function launch the configuration of the environment build process.

Example

build_PID_Environment()

Script functions

get_Configured_Environment_Tool

get_Configured_Environment_Tool(LANGUAGE ... [COMPILER ...] [AR...] [RANLIB...]
[FLAGS...] [HOST_COMPILER...] [TOOLCHAIN_ID...])
get_Configured_Environment_Tool(SYSTEM [GEN_TOOLSET ...] GEN_PLATFORM...] [LINKER ...] [AR...] [RANLIB...]
[EXE_FLAGS...] [MODULE_FLAGS...] [STATIC_FLAGS...] [SHARED_FLAGS...])

Get information about the currenltly configured tools used by the current environment. Support different signatures.

Required parameters

LANGUAGE lang:the language that is being configured (C, CXX, ASM, Fortran, CUDA, Pyhthon).
SYSTEM:tells that system wide (as opposed to language wide) variables are configured.

Optional parameters

COMPILER ...:the output variable containing the path to the compiler in use.
AR ...:the output variable containing the path to the archiver tool in use.
RANLIB ...:the output variable containing the path to static library creation tool in use.
HOST_COMPILER ...:
 the output variable containing the path to host c/c++ compiler in use.
TOOLCHAIN_ID ...:
 the output variable containing the toolchain ID for language.
INTERPRETER ...:
 the output variable containing the path to langauge interpreter.
INCLUDE_DIRS ...:
 the output variable containing the set of path to language standard library include dirs or system include dirs.
LIBRARY ...:the output variable containing the path to standard language library in use.
FLAGS ...:the output variable containing the set of compiler flags (if used with LANGUAGE).
LIBRARY_DIRS ...:
 the output variable containing the set of path to system library dirs.
PROGRAM_DIRS ...:
 the output variable containing the set of path to system program dirs.
LINKER ...:the output variable containing the path to the linker in use.
GEN_TOOLSET ...:
 the output variable containing the name of the generator toolset to use.
GEN_PLATFORM ...:
 the output variable containing the name of the generator platform to use.
EXE_FLAGS ...:the output variable containing the link flags for executables.
MODULE_FLAGS ...:
 the output variable containing the link flags for modules.
STATIC_FLAGS ...:
 the output variable containing the link flags for static libraries.
SHARED_FLAGS ...:
 the output variable containing the link flags for shared libraries.

Constraints

  • This function must be called in script files of the environment.

Effects

Set the variables used to configure the build environment.

Example

get_Configured_Environment_Tool(LANGUAGE ASM COMPILER asm_compiler_path)

get_Configured_Environment_Tool(SYSTEM LINKER path_to_linker EXE_FLAGS flags_for_exe)

configure_Environment_Tool

configure_Environment_Tool(LANGUAGE ... [COMPILER...] [AR...] [RANLIB...] [FLAGS...])
configure_Environment_Tool(SYSTEM [GENERATOR...] [LINKER ...] [[EXE|MODULE|STATIC|SHARED] FLAGS...])
configure_Environment_Tool(EXTRA ... [OPTIONS ...] [PLUGIN ...])

Configure the tools used for the current environment. Support different signatures.

Required parameters

LANGUAGE lang:the language that is being configured (C, CXX, ASM, Fortran, CUDA).
SYSTEM:tells that system wide (as opposed to language wide) variables are configured.
EXTRA tool_name:
 tells that an extra tool is defined.

Optional parameters

COMPILER ...:the path to the compiler in use (for LANGUAGE).
INTERPRETER ...:
 the path to the interpreter in use (for LANGUAGE, Python only for now).
HOST_COMPILER ...:
 the path to the host C compiler in use (for LANGUAGE, CUDA only for now).
TOOLSET_ID ...:identifier of the toolset (for LANGUAGE).
AR ...:the path to the archive tool in use (for LANGUAGE and SYSTEM).
RANLIB ...:the path to the static library creation tool (for LANGUAGE and SYSTEM)..
FLAGS ...:set of compiler flags (if used with LANGUAGE) or linker flags (if used with SYSTEM) to use.
LINKER ...:the path to the linker in use (for SYSTEM).
NM ...:the path to the nm tool in use (for SYSTEM).
OBJDUMP ...:the path to the objdump tool in use (for SYSTEM).
OBJCOPY ...:the path to the objcopy tool in use (for SYSTEM).
GEN_TOOLSET ...:
 the name of the generator toolset to use (for SYSTEM).
GEN_PLATFORM ...:
 the name of the generator platform to use (for SYSTEM).
EXE|MODULE|STATIC|SHARED:
 filters for selecting adequate type of binaries for which to apply link flags (for SYSTEM).
CURRENT:use the current environment to set all adequate variables of the target language (for LANGUAGE AND SYSTEM).
PROGRAM ...:memorize the path to the main extra tool program (for EXTRA).
LIBRARY:path to the target library (for EXTRA, LANGUAGE and SYSTEM).
PROGRAM_DIRS ...:
 list of path to library dirs (for EXTRA and SYSTEM).
INCLUDE_DIRS ...:
 list of path to include dirs (for LANGUAGE and SYSTEM).
LIBRARY_DIRS ...:
 list of path to library dirs (for SYSTEM).
CONFIGURATION ...:
 list of required platform configurations (for EXTRA).
PLUGIN [ BEFORE_DEPS ...] [BEFORE_COMPS ...] [DURING_COMPS ...] [AFTER_COMPS ...]:
 plugin script to call at specific package configuration times.

Constraints

  • This function must be called in script files of the environment.

Effects

Set the variables used to configure the build environment.

Example

configure_Environment_Tool(LANGUAGE ASM COMPILER ${CMAKE_ASM_COMPILER})

configure_Environment_Tool(SYSTEM LINKER ${CMAKE_LINKER} FLAGS -m32 )

configure_Environment_Tool(EXTRA pkg-config PROGRAM ${PKG_CONFIG_EXECUTABLE}
                           PLUGIN AFTER use_pkg-config.cmake)

return_Environment_Configured

return_Environment_Configured(value)
Sets the environment configuration process result.

Required parameters

Value:return value of the scrit : TRUE if configuration is OK and FALSE otherwise.

Constraints

  • This function must be called in script files of the environment.

Example

return_Environment_Configured()

return_Environment_Check

return_Environment_Check(value)
Sets the environment check process result.

Required parameters

Value:return value of the scrit : TRUE if current CMake configuration matches constraints and FALSE otherwise.

Constraints

  • This function must be called in check script file of the environment.

Example

return_Environment_Check()

host_Match_Target_Platform

host_Match_Target_Platform(IT_MATCHES)

Check whether host fullfil all target platform constraints.

Required parameters

IT_MATCHES:the ouput variable that is true if host fullfils all target platform constraints.

Constraints

  • This function must be called in script files of the environment.

Example

host_Match_Target_Platform(MATCHING)
if(MATCHING)
  # do something
endif()

get_Environment_Target_Platform

get_Environment_Target_Platform()

Get information about target platform. The function returns constraints that apply to the target platform.

Optional parameters

DISTRIBUTION <var>:
 the ouput variable containing the name of the distribution.
DISTRIB_VERSION <var>:
 the ouput variable containing the version of the distribution.
TYPE <var>:the ouput variable containing the type of processor (x86, arm).
ARCH <var>:the ouput variable containing the architecture for TYPE (16, 32 or 64).
OS <var>:the ouput variable containing the operating system name (linux, macos).
ABI <var>:the ouput variable containing the C++ ABI used (98 or 11).

Constraints

  • This function must be called in script files of the environment.

Example

get_Environment_Target_Platform(DISTRIBUTION distrib TYPE proc ARCH bits OS os)

get_Environment_Host_Platform

get_Environment_Host_Platform([OPTION var]...)

Get information about host platform. The function returns the current parameters of the host platform.

Optional parameters

DISTRIBUTION <var>:
 the ouput variable containing the name of the distribution.
DISTRIB_VERSION <var>:
 the ouput variable containing the version of the distribution.
TYPE <var>:the ouput variable containing the type of processor (x86, arm).
ARCH <var>:the ouput variable containing the processor architecture for TYPE (16, 32 or 64).
OS <var>:the ouput variable containing the operating system name (linux, macos).
ABI <var>:the ouput variable containing the C++ ABI used (98 or 11).

Constraints

  • This function must be called in script files of the environment.

Example

get_Environment_Host_Platform(DISTRIBUTION distrib TYPE proc ARCH bits OS os)

get_Environment_Target_ABI_Flags

get_Environment_Target_ABI_Flags(FLAGS target_abi)
Get C++ compiler flags to use the given ABI.

Required parameters

Target_abi:the desired ABI to be used
CFLAGS:the output variable that contains compile flags for using target abi

Example

get_Environment_Target_ABI_Flags(CFLAGS "stdc++11")

evaluate_Host_Platform

evaluate_Host_Platform()
Evaluate again the host platform configuration. To be used after an update of the host (for instance after using apt-get install).

Required parameters

RESULT <var>:the output variable that is TRUE if host now matches constraints

Effects

Recompure all internal cache variables describing the host.

Example

evaluate_Host_Platform(EVAL_RES)
if(EVAL_RES)
 # do something
endif()

check_Program_Version

check_Program_Version(RESULT version_var is_exact program_str version_extraction_regex)
Check whether a program matches version constraint.

Required parameters

RESULT:the output variable that contains the version of program if it matches version constraint, or TRUE if program has no version. Otherwise returns FALSE.
Version_var:the input variable containing version constraint
Is_exact:TRUE if version must exactly match
Program_str:the expression executed to get program version
Version_extraction_regex:
 the regular expression used to get versioninfo from program output

Example

check_Program_Version(EVAL_RES gcc_version "${gcc_exact}" "gcc -v" "^gcc[ \t]+version[ \t]+([^ \t]+)[ \t]+.*$")
if(EVAL_RES)
 # do something
endif()

extract_Version_Numbers

extract_Version_Numbers(MAJOR MINOR PATCH version)
extract numbers from a version string

Required parameters

MAJOR:the output variable that contains the major number of version.
MINOR:the output variable that contains the minor number of version.
PATCH:the output variable that contains the patch number of version.
Version:the full version string

Example

extract_Version_Numbers(MAJOR MINOR PATCH 1.2.3)
message("major number is ${MAJOR}")

check_Environment_Version

check_Environment_Version(RESULT version_var is_exact version_to_check)
Check whether a version of thenvironment matches a version constraint.

Required parameters

RESULT:the output variable that is TRUE if program matches version constraint
Version_var:the input variable containing version constraint
Is_exact:TRUE if version must exactly match

Example

check_Program_Version(EVAL_RES gcc_version "${gcc_exact}" "gcc -v" "^gcc[ \t]+version[ \t]+([^ \t]+)[ \t]+.*$")
if(EVAL_RES)
 # do something
endif()

get_Program_Version

get_Program_Version(VERSION program_str version_extraction_regex)
Get the version of a given program.

Required parameters

VERSION:the output variable that is TRUE if host now matches constraints
Program_str:the expression executed to get program version
Version_extraction_regex:
 the regular expression used to get versioninfo from program output

Example

get_Program_Version(VERSION_RES "gcc -v" "^gcc[ \t]+version[ \t]+([^ \t]+)[ \t]+.*$")
if(VERSION_RES)
 # do something
endif()

check_Environment_Architecture

check_Environment_Architecture(RESULT arch_var arch_list)
Check whether a set of architectures is allowed.

Required parameters

RESULT:the output variable that is TRUE if architecture(s) are all managed managed
Arch_var:the input variable containing architecture(s) to check

Example

check_Environment_Architecture(EVAL_RES cuda_architecture "6.1;7.1")
if(EVAL_RES)
 # do something
endif()

set_Environment_Constraints

set_Environment_Constraints(VARIABLES ... VALUES ...)
Set the value of a variable used as a constraint for the environment.

Required parameters

VARIABLES ...:the list of variables whose values are set
VALUES ...:the list of values corresponding to teh variables (same ordering).

Example

set_Environment_Constraints(VARIABLES version VALUES 3.25.2)

install_System_Packages

install_System_Packages(RESULT ...)
Install packages for various packaging systems (depends on host distribution)

Required parameters

:APT|PACMAN|YUM|BREW|PORTS|CHOCO ... : the list of package to install for a given packager. Many packages can be defined.

Required parameters

RESULT var:the output variable that is TRUE if somes packages have been installed, FALSE otherwise.

Example

install_System_Packages(APT gcc-9 PACMAN gcc-9)

Plugin functions

is_Language_Available

is_Language_Available(AVAILABLE language)

Check whether a language is sppourted by current build environment.

language:the langauge to check support for
AVAILABLE:The output variable that is TRUE if language is supported.

abort_When_Not_Required

abort_When_Not_Required()

Abort when the tool is not explictly required by current project

get_Package_Component_Compilation_Info

get_Package_Component_Compilation_Info(DEFS OPTS package component)

Get compilation options and definitions of a component of a given package.

package:target package
component:target component
DEFS:The output variable that contains preprocessor definitions.
OPTS:The output variable that contains compiler options

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Package_Component_Includes

get_Package_Component_Includes(PACKAGE_INCLUDE_FOLDER_IN_INSTALL INCLUDE_DIRS_ABS INCLUDE_DIRS_REL package component)

Get include directories for a component of a given package.

package:target package
component:target component
PACKAGE_INCLUDE_FOLDER_IN_INSTALL:
 The output variable that contains the path to package include folder.
INCLUDE_DIRS_ABS:
 The output variable that contains absolute include path (not in package install folder)
INCLUDE_DIRS_REL:
 The output variable that contains the include path relative to package install folder.

Constraints

  • This function must be called in AFTER_COMPS scripts.

is_First_Package_Configuration

is_First_Package_Configuration(FIRST_CONFIG)

Tells whether the current package has already been configure in another build mode or not.

FIRST_CONFIG:The output variable that is TRUE if package has not been configured in any mode already.

is_Native_Package

is_Native_Package(IS_NATIVE package)

Tells whether the package is native or not.

package:target package
IS_NATIVE:The output variable that is TRUE if package is native, FALSE otherwise

Constraints

  • This function cannot be called in BEFORE_DEPS scripts.

is_External_Package

is_External_Package(IS_EXTERNAL package)

Tells whether the package is external or not.

package:target package
IS_EXTERNAL:The output variable that is TRUE if package is external, FALSE otherwise

Constraints

  • This function cannot be called in BEFORE_DEPS scripts.

get_Package_Project_Page

get_Package_Project_Page(VERSION package)

Get project page of the package.

package:target package
URL:The output variable containing the URL of the package’s project

get_Package_Version

get_Package_Version(VERSION package)

Get version of the package.

package:target package
VERSION:The output variable containing the version number of the package

Constraints

  • This function cannot be called in BEFORE_DEPS scripts.

get_Description

get_Description(DESCR package component)

Get decription for the component. If none specified for the component the package description is given.

package:target package
component:target component
DESCR:The output variable containing the description of the component

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Package_Libraries_Dirs

get_Package_Libraries_Dirs(ALL_INCLUDE_DIRS ALL_SOURCE_DIRS)

Get all directories of the current package containing headers and sources of libraries.

ALL_HEADER_DIRS:
 The output variable containing the list of all directories containing libraries headers
ALL_SOURCE_DIRS:
 The output variable containing the list of all directories containing libraries sources

get_Package_Apps_Dirs

get_Package_Apps_Dirs(ALL_SOURCE_DIRS)

Get all directories of the current package containing sources of applications.

ALL_SOURCE_DIRS:
 The output variable containing the list of all directories containing applications sources

get_Package_Tests_Dirs

get_Package_Tests_Dirs(ALL_SOURCE_DIRS)

Get all directories of the current package containing sources of tests.

ALL_SOURCE_DIRS:
 The output variable containing the list of all directories containing test sources

dereference_Residual_Files

dereference_Residual_Files(list_of_git_patterns)

Dereference the residual files of the pugins (if any) in the git repository so that they will not be part of a commit.

list_of_git_patterns:
 The list of patterns to exlcude from git

generate_Code_In_Place

generate_Code_In_Place(list_of_source_files generated_extension command)

use a generator to generated compilable files in same directory as where source files are placed.

list_of_source_files:
 The list of generated files
generated_extension:
 the extension for generated file
command:The command to call
message:The commennt to print when calling the generation command

remove_Residual_Files

remove_Residual_Files(list_of_files)

Remove the residual files of the pugins (if any). Files path are relative to project source directory.

list_of_files:The list of path to files to remove

convert_Files_Extensions

convert_Files_Extensions(RES_FILES_PATH input_list generated_extension)

Convert a set of file with one extension to the same set of file with another extension.

input_list:The list of file to convert
generated_extension:
 The expression specifying what is the new extension for files.
RES_FILES_PATH:The output variable containing the list of path to resulting files relative to current package root folder.

get_Current_Component_Files

get_Current_Component_Files(ALL_FILES extension_filters)

Get all source files of a component whose extension matches the possible extensions.

extension_filters:
 The list of possible extensions
ALL_PUB_HEADERS:
 The output variable containing the list of path to files.
ALL_SOURCES:The output variable containing the list of path to files.

Constraints

  • This function must be called in DURING_COMPS scripts.

configure_Current_Component

configure_Current_Component(...)

Set properties of current component.

environment:The name of environment defining the plugin.
INTERNAL:if used then the following configuration is internal to the current component.
EXPORTED:if used then the following configuration is exported by the current component.
CONFIGURATION ...:
 The list of platform configuration to use to configure the component.

Constraints

  • This function must be called in DURING_COMPS scripts.

get_Environment_Configuration

get_Environment_Configuration(environment ...)

Get configuration information coming from the environment.

environment:The name of environment defining the plugin.

:PROGRAM var : The output variable containing the path to the program defined by the environment :PROGRAM_DIRS var : The output variable containing the list of runtime path defined by the environment :CONFIGURATION var : The output variable containing the list of platform configurations required by the environment

get_Path_To_Environment

get_Path_To_Environment(environment)

Get the path to the environment containing the script currently executed.

environment:The name of environment.
RES_PATH:The output variable containing hte path to the environment defining the script

list_Defined_Components

list_Defined_Components(LIST_OF_COMPS)

Get the list of components defined within the current package

LIST_OF_COMPS:The output variable containing teh list of components defined into the package

Constraints

  • This function must be called in AFTER_COMPS scripts.

list_Component_Direct_External_Package_Dependencies

list_Component_Direct_External_Package_Dependencies(DIRECT_EXT_DEPS package component)

List all direct dependencies of a component defined in a given package. This function gives the set of external package names used by the component.

package:target package
component:target component
DIRECT_EXT_DEPS:
 The output variable that contains the list of package names that component depends on.

Constraints

  • This function must be called in AFTER_COMPS scripts.

list_Component_Direct_External_Component_Dependencies

list_Component_Direct_External_Component_Dependencies(DIRECT_EXT_DEPS package component ext_package)

List all direct dependencies of a component defined in a given package. This function gives the set of external component names used by the component.

package:target package
component:target component
ext_package:target external package that IS the dependency
DIRECT_EXT_DEPS:
 The output variable that contains the list of component names that component depends on.

Constraints

  • This function must be called in AFTER_COMPS scripts.

list_Component_Direct_Internal_Dependencies

list_Component_Direct_Internal_Dependencies(DIRECT_INT_DEPS package component)

List all direct dependencies (components inside same package) of a component defined in a given package.

package:target package
component:target component
DIRECT_INT_DEPS:
 The output variable that contains the list of component names that component depends on.

Constraints

  • This function must be called in AFTER_COMPS scripts.

list_Component_Direct_Native_Package_Dependencies

list_Component_Direct_Native_Package_Dependencies(DIRECT_NAT_DEPS package component)

List all direct dependencies of a component defined in a given package. This function gives the set of native package names used by the component.

package:target package
component:target component
DIRECT_NAT_DEPS:
 The output variable that contains the list of native package names that component depends on.

Constraints

  • This function must be called in AFTER_COMPS scripts.

list_Component_Direct_Native_Component_Dependencies

list_Component_Direct_Native_Component_Dependencies(DIRECT_NAT_DEPS package component nat_package)

List all direct dependencies of a component defined in a given package. This function gives the set of native component names used by the component.

package:target package
component:target component
nat_package:target native package that IS the dependency
DIRECT_NAT_DEPS:
 The output variable that contains the list of native package names that component depends on.

Constraints

  • This function must be called in AFTER_COMPS scripts.

is_Component_Exported

is_Component_Exported(EXPORTED package component dep_package dep_component)

Tells wether a component export another component

package:target package
component:target component
dep_package:target package that IS the dependency
dep_component:target component that IS the dependency
EXPORTED:The output variable that is TRUE if component exports dep_component, FALSE otherwise.

Constraints

  • This function must be called in AFTER_COMPS scripts.

list_Defined_Applications

list_Defined_Applications(LIST_OF_COMPS)

Get the list of libraries defined within the current package

LIST_OF_COMPS:The output variable containing the list of applications defined into the package

Constraints

  • This function must be called in AFTER_COMPS scripts.

list_Defined_Libraries

list_Defined_Libraries(LIST_OF_COMPS)

Get the list of libraries defined within the current package

LIST_OF_COMPS:The output variable containing the list of libraries defined into the package

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Component_Type

get_Component_Type(REST_TYPE component)

Get the type of a component defined within the current package

component:The target component
REST_TYPE:The type of this component

Constraints

  • This function can be called in DURING_COMPS or AFTER_COMPS scripts.

get_Component_Target

get_Component_Target(REST_TARGET component)

Get the name of the CMake target for the given component.

component:The target component
RES_TARGET:The name of target for this component

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Component_Dependencies_Targets

get_Component_Dependencies_Targets(RES_DEPS component)

Get the dependencies of a component defined in current package.

component:The target source component
RES_DEPS:The output variable containing the list of components that component depends on

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Package_Component_Target

get_Package_Component_Target(RES_TARGET package component)

Get the name of the CMake target for a given component of a given package.

package:The target package
component:The target component
RES_TARGET:The name of target for this component

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Package_Component_Dependencies_Targets

get_Package_Component_Dependencies_Targets(RES_DEPS package component)

Get the targets for all dependencies of a component belonging to a specific package.

package:The target package
component:The target component
RES_DEPS:The output variable containing the list of targets that component targets depends on

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Component_Language_Standard

get_Component_Language_Standard(MANAGED_AS_STANDARD RES_C_STD RES_CXX_STD RES_C_OPT RES_CXX_OPT component)

Get information about language standards used by a component.

component:The target component
MANAGED_AS_STANDARD:
 The output variable that is TRUE if langauge is defined via CMake Language standard support feature instead of direct compiler option, FALSE otherwise
RES_C_STD:The output variable that contains the C language standard version used by the component.
RES_CXX_STD:The output variable that contains the C++ language standard version used by the component.
RES_C_OPT:The output variable thatcontains the C compiler option to use to get equivalent C language standard version.
RES_CXX_OPT:The output variable thatcontains the C++ compiler option to use to get equivalent C++ language standard version.

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Package_Component_Language_Standard

get_Package_Component_Language_Standard(MANAGED_AS_STANDARD RES_C_STD RES_CXX_STD RES_C_OPT RES_CXX_OPT package component)

Get information about language standards used by a component of a given package.

package:The target package
component:The target component
MANAGED_AS_STANDARD:
 The output variable that is TRUE if langauge is defined via CMake Language standard support feature instead of direct compiler option, FALSE otherwise
RES_C_STD:The output variable that contains the C language standard version used by the component.
RES_CXX_STD:The output variable that contains the C++ language standard version used by the component.
RES_C_OPT:The output variable that contains the C compiler option to use to get equivalent C language standard version.
RES_CXX_OPT:The output variable that contains the C++ compiler option to use to get equivalent C++ language standard version.

Constraints

  • This function must be called in AFTER_COMPS scripts.

get_Dir_Path_For_Component

get_Dir_Path_For_Component(RET_SOURCE_PATH RET_HEADER_PATH component)

Get the source and/or include folders containig the code of a component defined in currrent project.

component:The target component
RET_SOURCE_PATH:
 The output variable containing the path to component internal sources directory
RET_HEADER_PATH:
 The output variable containing the path to component exported headers directory

Constraints

  • This function must be called in AFTER_COMPS scripts.