GNAT Project Manager#
GPRBuild is a multi-language build tool that serves as a common facility for GNAT Project Files (.gpr
). The default
configuration supports Ada, Assembler, C, C++ and Fortran but it can be extended to support other tools. Note: the
information for this page primarily comes from the GPR Tools User Guide.
The GPR tools that use .gpr
files are:
gprbuild
runs projects.gprslave
helps distribute build work across networks.gprconfig
detects available compilers.gprclean
removes projects.gprinstall
copies objects to their final destination.gprname
generates naming schemes.gprls
helps browse libraries.
The general build process is:
- Compile
- Bind
- Link
Project Files#
Project files use a syntax similar to Ada and building projects can be done with scenarios to specialise builds and the
required libraries can be automatically built. In addition to importing other projects, they can also be extended. All
tools have the common -P<project file>
switch in order to specify a project file and -X<variable>=<value>
to define
an external variable. There is a single object directory per project that contains the intermediate/cache build files.
There may be any number of main files (a file containing the main
subprogram in Ada or the main
function
in C) in a project which allows for several executables to be built from one project.
Example Single-Project Structure
src/
main.adb
file1.adb
file1.ads
file2.adb
file2.ads
obj/
project_name.gpr
project Project_Name is
for Source_Dirs use ("src");
for Excluded_Source_Dirs use ();
for Object_Dir use "obj";
for Exec_Dir use ".";
for Main use "main.adb";
end Project_Name;
gprbuild -Pproject_name
Tool Options#
Projects contain zero or more packages that are tool-specific attributes. Packages may contain attribute declarations, variable declarations and case constructions.
project Project_Name is
...
package Compiler is
for Default_Switches ("Ada") use ("-O2");
for Switches ("proc.adb") use ("-O0");
end Compiler;
end Project_Name;
Package | Description |
---|---|
Binder |
Specifies characteristics useful when invoking the binder either directly via the gnat driver or when using GPRbuild. |
Builder |
Specifies the compilation options used when building an executable or a library for a project. Most of the options should be set in one of Compiler, Binder or Linker packages, but there are some general options that should be defined in this package. |
Clean |
Specifies the options used when cleaning a project or a project tree using the tools gnatclean or gprclean . |
Compiler |
Specifies the compilation options used by the compiler for each language. |
Gnatls |
Specifies the options to use when invoking gnatls via the gnat driver. |
Install |
Specifies the options used when installing a project with gprinstall . |
Linker |
Specifies the options used by the linker. |
Naming |
Specifies the naming conventions that apply to the source files in a project. In particular, these conventions are used to automatically find all source files in the source directories, or given a file name to find out its language for proper processing. |
project Project_Name is
for Source_Dirs use ("src");
for Excluded_Source_Dirs use ();
for Object_Dir use "obj";
for Exec_Dir use ".";
for Main use "main.adb";
package Builder is
for Executable ("proc.adb") use "proc1";
end Builder;
package Compiler is
for Default_Switches ("Ada") use ("-O2");
end Compiler;
end Project_Name;
Attributes#
Attribute |
Description |
---|---|
Source_Dirs |
The root directory or directories as a list for the project’s source. – Always use Unix-style paths for portability. |
Source_Files |
Specifies which files are to be included instead of matching all files in Source_Dirs . |
Source_List_File |
Specifies a file that contains a list of source files (one per line with no directory information) that are used as if they were defined as a Source_Files list. |
Excluded_Source_Dirs |
Specifies which directories to ignore. |
Excluded_Source_Files |
Specifies which files are to be ignored in the project’s directories. |
Excluded_Source_List_File |
Specifies a file that contains a list of source files (one per line with no directory information) that are ignored as if they were defined as a Excluded_Source_Files list. |
Ignore_Source_Sub_Dirs |
Specifies a list of subdirectories to ignore in each directory. |
Object_Dir |
Specifies the path to the object directory (for intermediate files such as .obj and .ali ). – The directory must already exist, but can be automatically created if -p is specified. |
Exec_Dir |
Specifies the directory to output the executable file to |
Main |
Specifies a list of files containing main files. When this is defined, it is not necessary to specify main files in the terminal invocation. |
Languages |
List of languages in the project which are used to determine the file types to be matched. – Default options are: Ada, C, C++, Fortran. |
Default values for attributes are an empty string or an empty list, except for:
Object_Dir
defaults to"."
Exec_Dir
defaults to'Object_Dir
Source_Dirs
defaults to(".")
Attributes may be prefixed with:
project
for an attribute of the current project.- The name of an existing package of the current project.
- The name of an imported project.
- The name of a parent project that is extended by the current project.
- An expanded name whose prefix is imported/base/parent project name and whose selector is a package name.
project'Object_Dir
Naming'Dot_Replacement
Imported_Project'Source_Dirs
Imported_Project.Naming'Casing
Builder'Default_Switches("Ada")
Wildcards
Unix-style wildcards such as *
and **
may be used for paths. For example, ./**
refers to the current directory
and all children recursively and .*
refers to all files starting with a period in the current directory.
Attributes#
Project-Level#
Attribute |
Description |
---|---|
Archive_Builder |
List value, not inherited from extended project Value is the name of the application to be used to create a static library (archive), followed by the options to be used. If an empty value is provided, object files used as a recipe for the archive are copied to the library directory instead. |
Archive_Builder_Append_Option |
List value, not inherited from extended project Value is the list of options to be used when invoking the archive builder to add project files into an archive. |
Archive_Indexer |
List value, not inherited from extended project Value is the name of the archive indexer, followed by the required options. |
Archive_Prefix |
Single value, not inherited from extended project Value is the prefix of archives. When not declared, the prefix is ‘lib’. |
Archive_Suffix |
Single value, not inherited from extended project Value is the extension of archives. When not declared, the extension is .a . |
Library_Partial_Linker |
List value, not inherited from extended project Value is the name of the partial linker executable, followed by the required options. If set to an empty list, partial linking is not performed. |
Attribute |
Description |
---|---|
Create_Missing_Dirs |
Single value Indicates if the missing object, library and executable directories should be created automatically by the project-aware tool. Taken into account only in the main project. Only authorized case-insensitive values are true and false . |
Exec_Dir |
Single value, not inherited from extended project Indicates the exec directory for the project, that is the directory where the executables are. |
Ignore_Source_Sub_Dirs |
List value, not inherited from extended project Value is a list of simple names or patterns for subdirectories that are removed from the list of source directories, including their subdirectories. |
Inherit_Source_Path |
List value, indexed by a language Index is a language name. Value is a list of language names. Indicates that in the source search path of the index language the source directories of the languages in the list should be included. |
Object_Dir |
Single value, not inherited from extended project Indicates the object directory for the project. |
Source_Dirs |
List value, not inherited from extended project The list of source directories of the project. |
Attribute |
Description |
---|---|
Config_Prj_File |
Single value The main configuration project file. |
Default_Language |
Single value, not inherited from extended project Value is the case-insensitive name of the language of a project when attribute Languages is not specified. |
Object_Generated |
Single value, indexed by a language Index is a language name. Indicates if invoking the compiler for a language produces an object file. Only authorized case-insensitive values are false and true (the default). |
Objects_Linked |
Single value, indexed by a language Index is a language name. Indicates if the object files created by the compiler for a language need to be linked in the executable. Only authorized case-insensitive values are false and true (the default). |
Required_Toolchain_Version |
Single value, indexed by a language Index is a language name. Specify the value expected for the Toolchain_Version attribute for this language, typically provided by an auto-generated configuration project. If Required_Toolchain_Version and Toolchain_Version do not match, the project processing aborts with an error. |
Run_Path_Option |
List value, not inherited from extended project Value is the list of switches to be used when specifying the run path option in an executable. |
Run_Path_Origin |
Single value, not inherited from extended project Value is the string that may replace the path name of the executable directory in the run path options. |
Runtime |
Single value, indexed by a language Index is a language name. Indicates the runtime directory that is to be used when using the compiler of the language. Taken into account only in the main project, or its extended projects if any. Note that when the runtime is specified for a language on the command line (usually with a switch --RTS ), the value of attribute reference ‘Runtime for this language is the one specified on the command line. |
Runtime_Dir |
Single value, indexed by a language Index is a language name. Value is the path name of the runtime directory for the language. |
Runtime_Source_Dirs |
List value, indexed by a language Index is a language name. Value is the path names of the directories where the sources of runtime libraries are located. This attribute is not normally declared. |
Separate_Run_Path_Options |
Single value, not inherited from extended project Indicates if there may be several run path options specified when linking an executable. Only authorized case-insensitive values are true or false (the default). |
Target |
Single value Value is the name of the target platform. Taken into account only in the main project. Note that when the target is specified on the command line (usually with a switch --target= ), the value of attribute reference 'Target is the one specified on the command line. |
Toolchain_Version |
Single value, indexed by a language Index is a language name. Specify the version of a toolchain for a language. |
Toolchain_Name |
Single value, indexed by a language Index is a language name. Indicates the toolchain name that is to be used when using the compiler of the language. Taken into account only in the main project, or its extended projects if any. |
Attribute |
Description |
---|---|
Excluded_Source_Files |
List value, not inherited from extended project Value is a list of simple file names that are not sources of the project. Allows to remove sources that are inherited or found in the source directories and that match the naming scheme. |
Excluded_Source_List_File |
Single value, not inherited from extended project Value is a text file name that contains a list of file simple names that are not sources of the project. |
Interfaces |
Set value, case-sensitive Value is a list of file names that constitutes the interfaces of the project. |
Source_Files |
List value, not inherited from extended project Value is a list of source file simple names. |
Source_List_File |
Single value, not inherited from extended project Value is a text file name that contains a list of source file simple names, one on each line. |
Attribute |
Description |
---|---|
External |
Single value, indexed by an external reference Index is the name of an external reference. Value is the value of the external reference to be used when parsing the aggregated projects. |
Project_Files |
List value, not inherited from extended project Value is the list of aggregated projects. |
Project_Path |
List value, not inherited from extended project Value is a list of directories that are added to the project search path when looking for the aggregated projects. |
Attribute |
Description |
---|---|
Externally_Built |
Single value, not inherited from extended project Indicates if the project is externally built. Only case-insensitive values allowed are true and false , the default. |
Languages |
Set value, case-insensitive The list of languages of the sources of the project. |
Main |
List value The list of main sources for the executables. |
Name |
Single value, read-only, not inherited from extended project The name of the project. |
Project_Dir |
Single value, read-only, not inherited from extended project The path name of the project directory. |
Roots |
List value, indexed by a source glob or language The index is the file name of an executable source. Indicates the list of units from the main project that need to be bound and linked with their closures with the executable. The index is either a file name, a language name or * . The roots for an executable source are those in Roots with an index that is the executable source file name, if declared. Otherwise, they are those in Roots with an index that is the language name of the executable source, if present. Otherwise, they are those in Roots (* ), if declared. If none of these three possibilities are declared, then there are no roots for the executable source. |
Warning_Message |
Single value Causes gprbuild to emit a user-defined warning message. |
Attribute |
Description |
---|---|
Leading_Library_Options |
List value, configuration concatenable, not inherited from extended project Value is a list of options that are to be used at the beginning of the command line when linking a shared library. |
Library_Auto_Init |
Single value, not inherited from extended project Indicates if a Stand-Alone Library is auto-initialized. Only authorized case-insensitive values are true and false . Default to Library_Auto_Init_Supported value. Can not be set to true if Library_Auto_Init_Supported is false . |
Library_Dir |
Single value Value is the name of the library directory. This attribute needs to be declared for each library project. |
Library_Encapsulated_Options |
List value, configuration concatenable, not inherited from extended project Value is a list of options that need to be used when linking an encapsulated Stand-Alone Library. |
Library_Encapsulated_Supported |
Single value, not inherited from extended project Indicates if encapsulated Stand-Alone Libraries are supported. Only authorized case-insensitive values are true and false (the default). |
Library_Interface |
Set value, case-insensitive Value is the list of unit names that constitutes the interfaces of a Stand-Alone Library project. |
Library_Kind |
Single value, not inherited from extended project Specifies the kind of library static library (archive) or shared library. Case-insensitive values must be one of static for archives (the default), static-pic for archives of Position Independent Code, or dynamic or relocatable for shared libraries. |
Library_Name |
Single value Value is the name of the library. This attribute needs to be declared or inherited for each library project. |
Library_Options |
List value, configuration concatenable, not inherited from extended project Value is a list of options that are to be used when linking a shared library. |
Library_Reference_Symbol_File |
Single value, not inherited from extended project Value is the name of the reference symbol file. |
Library_Rpath_Options |
List value, indexed by a language, configuration concatenable Index is a language name. Value is a list of options for an invocation of the compiler of the language. This invocation is done for a shared library project with sources of the language. The output of the invocation is the path name of a shared library file. The directory name is to be put in the run path option switch when linking the shared library for the project. |
Library_Src_Dir |
Single value, not inherited from extended project Value is the name of the directory where copies of the sources of the interfaces of a Stand-Alone Library are to be copied. |
Library_Standalone |
Single value, not inherited from extended project Specifies if a Stand-Alone Library (SAL) is encapsulated or not. Only authorized case-insensitive values are standard for non encapsulated SALs, encapsulated for encapsulated SALs or no for non SAL library project. |
Library_Symbol_File |
Single value, not inherited from extended project Value is the name of the library symbol file. |
Library_Symbol_Policy |
Single value, not inherited from extended project Indicates the symbol policy kind. Only authorized case-insensitive values are restricted , unrestricted . |
Library_Version |
Single value, not inherited from extended project Value is the name of the library file. |
Attribute |
Description |
---|---|
Library_Auto_Init_Supported |
Single value, not inherited from extended project Indicates if auto-initialization of Stand-Alone Libraries is supported. Only authorized case-insensitive values are true and false (the default). |
Library_Install_Name_Option |
Single value, not inherited from extended project Value is the name of the option that needs to be used, concatenated with the path name of the library file, when linking a shared library. |
Library_Major_Minor_Id_Supported |
Single value, not inherited from extended project Indicates if major and minor ids for shared library names are supported on the platform. Only authorized case-insensitive values are true and false (the default). |
Library_Version_Switches |
List value, configuration concatenable, not inherited from extended project Value is the list of switches to specify a internal name for a shared library. |
Shared_Library_Minimum_Switches |
List value, not inherited from extended project Value is the list of required switches when linking a shared library. |
Shared_Library_Prefix |
Single value, not inherited from extended project Value is the prefix in the name of shared library files. When not declared, the prefix is lib . |
Shared_Library_Suffix |
Single value, not inherited from extended project Value is the extension of the name of shared library files. When not declared, the extension is .so . |
Symbolic_Link_Supported |
Single value, not inherited from extended project Indicates if symbolic links are supported on the platform. Only authorized case-insensitive values are true and false (the default). |
Attribute |
Description |
---|---|
Library_Builder |
Single value, not inherited from extended project Value is the path name of the application that is to be used to build libraries. Usually the path name of gprlib . |
Library_Support |
Single value, not inherited from extended project Indicates the level of support of libraries. Only authorized case-insensitive values are static_only , full or none (the default). |
Linker_Lib_Dir_Option |
Single value, not inherited from extended project Option used to add a library directory to the linker search path. |
Package Attributes#
Attribute |
Description |
---|---|
Default_Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a language name. Value is the list of switches to be used when binding code of the language, if there is no applicable attribute Switches. |
Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is either a language name or a source file name. Value is the list of switches to be used when binding code. Index is either the source file name of the executable to be bound or the language name of the code to be bound. |
Attribute |
Description |
---|---|
Driver |
Single value, indexed by a language Index is a language name. Value is the name of the application to be used when binding code of the language. |
Objects_Path |
Single value, indexed by a language Index is a language name. Value is the name of the environment variable that contains the path for the object directories. |
Prefix |
Single value, indexed by a language Index is a language name. Value is a prefix to be used for the binder exchange file name for the language. Used to have different binder exchange file names when binding different languages. |
Required_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of the required switches to be used when binding code of the language. |
Attribute |
Description |
---|---|
Default_Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a language name. Value is the list of builder switches to be used when building an executable of the language, if there is no applicable attribute Switches. |
Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is either a language name or a source file name. Value is the list of builder switches to be used when building an executable. Index is either the source file name of the executable to be built or its language name. |
Executable |
Single value, indexed by a file name Index is an executable source file name. Value is the simple file name of the executable to be built. |
Executable_Suffix |
Single value Value is the extension of the file name of executables. The actual default value for the extension depends on the host: .exe on windows, else an empty string. |
Global_Compilation_Switches |
List value, indexed by a language, “others” index allowed, configuration concatenable Index is a language name. Value is the list of compilation switches to be used when building an executable. Index is either the source file name of the executable to be built or its language name. |
Global_Config_File |
Single value, indexed by a language Index is a language name. Value is the file name of a configuration file that is specified to the compiler when compiling any source of the language in the project tree. |
Global_Configuration_Pragmas |
Single value Value is the file name of a configuration pragmas file that is specified to the Ada compiler when compiling any Ada source in the project tree. |
Attribute |
Description |
---|---|
Switches |
List value, configuration concatenable Taken into account only in the main project. Value is a list of switches to be used by the cleaning application. |
Artifacts_In_Exec_Dir |
List value Value is list of file names expressed as regular expressions that are to be deleted by gprclean in the exec directory of the main project. |
Artifacts_In_Object_Dir |
List value Value is a list of file names expressed as regular expressions that are to be deleted by gprclean in the object directory of the project. |
Object_Artifact_Extensions |
List value, indexed by a language Index is a language names. Value is the list of extensions for file names derived from source file names that need to be cleaned in the object directory of the project. |
Source_Artifact_Extensions |
List value, indexed by a language Index is a language names. Value is the list of extensions for file names derived from object file names that need to be cleaned in the object directory of the project. |
Attribute |
Description |
---|---|
Default_Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a language name. Value is a list of switches to be used when invoking the compiler for the language for a source of the project, if there is no applicable attribute Switches. |
Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a source file name or a language name. Value is the list of switches to be used when invoking the compiler for the source or for its language. |
Local_Config_File |
Single value, indexed by a language Index is a language name. Value is the file name of a configuration file that is specified to the compiler when compiling any source of the language in the project. |
Local_Configuration_Pragmas |
Single value Value is the file name of a configuration pragmas file that is specified to the Ada compiler when compiling any Ada source in the project. |
Attribute |
Description |
---|---|
Driver |
Single value, indexed by a language Index is a language name. Value is the name of the executable for the compiler of the language. |
Required_Switches |
List value, indexed by a language, configuration concatenable Equivalent to attribute Leading_Required_Switches . |
Dependency_Kind |
Single value, indexed by a language Index is a language name. Indicates how the dependencies are handled for the language. Only authorized case-insensitive values are makefile , ali_file , ali_closure or none (the default). |
Language_Kind |
Single value, indexed by a language Index is a language name. Indicates the kind of the language, either file based or unit based. Only authorized case-insensitive values are unit_based and file_based (the default). |
Leading_Required_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of the minimum switches to be used at the beginning of the command line when invoking the compiler for the language. |
Multi_Unit_Object_Separator |
Single value, indexed by a language Index is a language name. Value is the string to be used in the object file name before the index of the unit, when compiling a unit in a multi unit source of the language. |
Multi_Unit_Switches |
List value, indexed by a language Index is a language name. Value is the list of switches to be used to compile a unit in a multi unit source of the language. The index of the unit in the source is concatenated with the last switches in the list. |
Object_File_Suffix |
Single value, indexed by a language Index is a language name. Value is the extension of the object files created by the compiler of the language. When not specified, the extension is the default one for the platform. |
Object_File_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of switches to be used by the compiler of the language to specify the path name of the object file. When not specified, the switch used is -o . |
Source_File_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is a list of switches to be used just before the path name of the source to compile when invoking the compiler for a source of the language. |
Trailing_Required_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of the minimum switches to be used at the end of the command line when invoking the compiler for the language. |
Attribute |
Description |
---|---|
Config_Body_File_Name |
Single value, indexed by a language Index is a language name. Value is the template to be used to indicate a configuration specific to a body of the language in a configuration file. |
Config_Body_File_Name_Index |
Single value, indexed by a language Index is a language name. Value is the template to be used to indicate a configuration specific to the body a unit in a multi unit source of the language in a configuration file. |
Config_Body_File_Name_Pattern |
Single value, indexed by a language Index is a language name. Value is the template to be used to indicate a configuration for all bodies of the languages in a configuration file. |
Config_File_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of switches to specify to the compiler of the language a configuration file. |
Config_File_Unique |
Single value, indexed by a language Index is a language name. Indicates if there should be only one configuration file specified to the compiler of the language. Only authorized case-insensitive values are true and false (the default). |
Config_Spec_File_Name |
Single value, indexed by a language Index is a language name. Value is the template to be used to indicate a configuration specific to a spec of the language in a configuration file. |
Config_Spec_File_Name_Index |
Single value, indexed by a language Index is a language name. Value is the template to be used to indicate a configuration specific to the spec a unit in a multi unit source of the language in a configuration file. |
Config_Spec_File_Name_Pattern |
Single value, indexed by a language Index is a language name. Value is the template to be used to indicate a configuration for all specs of the languages in a configuration file. |
Attribute |
Description |
---|---|
Dependency_Driver |
List value, indexed by a language Index is a language name. Value is the name of the executable to be used to create the dependency file for a source of the language, followed by the required switches. |
Dependency_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of switches to be used to specify to the compiler the dependency file when the dependency kind of the language is file based, and when Dependency_Driver is not specified for the language. |
Attribute |
Description |
---|---|
Include_Path |
Single value, indexed by a language Index is a language name. Value is the name of an environment variable that contains the path of all the directories that the compiler of the language may search for sources. |
Include_Path_File |
Single value, indexed by a language Index is a language name. Value is the name of an environment variable the value of which is the path name of a text file that contains the directories that the compiler of the language may search for sources. |
Include_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of switches to specify to the compiler of the language to indicate a directory to look for sources. |
Object_Path_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of switches to specify to the compiler of the language the name of a text file that contains the list of object directories. When this attribute is not declared, the text file is not created. |
Attribute |
Description |
---|---|
Mapping_Body_Suffix |
Single value, indexed by a language Index is a language name. Value is the suffix to be used in a mapping file to indicate that the source is a body. |
Mapping_File_Switches |
List value, indexed by a language, configuration concatenable Index is a language name. Value is the list of switches to be used to specify a mapping file when invoking the compiler for a source of the language. |
Mapping_Spec_Suffix |
Single value, indexed by a language Index is a language name. Value is the suffix to be used in a mapping file to indicate that the source is a spec. |
Attribute |
Description |
---|---|
Max_Command_Line_Length |
Single value Value is the maximum number of character in the command line when invoking a compiler that supports response files. |
Response_File_Format |
Single value, indexed by a language Indicates the kind of response file to create when the length of the compiling command line is too large. The index is the name of the language for the compiler. Only authorized case-insensitive values are none , gnu , object_list , gcc_gnu , gcc_option_list and gcc_object_list . |
Response_File_Switches |
List value, indexed by a language, configuration concatenable Value is the list of switches to specify a response file for a compiler. The index is the name of the language for the compiler. |
Attribute |
Description |
---|---|
Switches |
List value Taken into account only in the main project. Value is a list of switches to be used when invoking gnatls . |
Attribute |
Description |
---|---|
Prefix |
Single value Value is the install destination directory. If the value is a relative path, it is taken as relative to the global prefix directory. That is, either the value passed to –prefix option or the default installation prefix. |
Active |
Single value Indicates that the project is to be installed or not. Case-insensitive value false means that the project is not to be installed, all other values mean that the project is to be installed. |
Artifacts |
List value, indexed by a file name An indexed attribute to declare a set of files not part of the sources to be installed. The array index is the directory where the file is to be installed. If a relative directory then Prefix (see below) is prepended. Note also that if the same file name occurs multiple time in the attribute list, the last one will be the one installed. If an artifact is not found a warning is displayed. |
Exec_Subdir |
Single value Value is the executables directory or subdirectory of Prefix . |
Install_Name |
Single value Specify the name to use for recording the installation. The default is the project name without the extension. |
Install_Project |
Single value Indicates that a project is to be generated and installed. The value is either true to false . Default is true . |
Lib_Subdir |
Single value Value is library directory or subdirectory of Prefix . |
Mode |
Single value Value is the installation mode, it is either dev (default) or usage . |
Project_Subdir |
Single value Value is the project directory or subdirectory of Prefix . |
Required_Artifacts |
List value, indexed by a file name As above, but artifacts must be present or an error is reported. |
Side_Debug |
Single value Indicates that the project’s executable and shared libraries are to be stripped of the debug symbols. Those debug symbols are written into a side file named after the original file with the .debug extension added. Case-insensitive value false (default) disables this feature. Set it to true to activate. |
Sources_Subdir |
Single value Value is the sources directory or subdirectory of Prefix . |
Attribute |
Description |
---|---|
Default_Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a language name. Value is a list of switches for the linker when linking an executable for a main source of the language, when there is no applicable Switches. |
Required_Switches |
List value, configuration concatenable Value is a list of switches that are required when invoking the linker to link an executable. |
Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a source file name or a language name. Value is the list of switches to be used when invoking the linker to build an executable for the source or for its language. |
Group_End_Switch |
Single value Value is the switch to use to end a link group, a group of libraries to be linked with recursively. |
Group_Start_Switch |
Single value Value is the switch to use to start a link group, a group of libraries to be linked with recursively. |
Leading_Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a source file name or a language name. Value is the list of switches to be used at the beginning of the command line when invoking the linker to build an executable for the source or for its language. |
Linker_Options |
List value, configuration concatenable This attribute specifies a list of additional switches to be given to the linker when linking an executable. It is ignored when defined in the main project and taken into account in all other projects that are imported directly or indirectly. These switches complement the Linker’Switches defined in the main project. This is useful when a particular subsystem depends on an external library: adding this dependency as a Linker_Options in the project of the subsystem is more convenient than adding it to all the Linker’Switches of the main projects that depend upon this subsystem. |
Trailing_Switches |
List value, indexed by a source glob or language, “others” index allowed, configuration concatenable Index is a source file name or a language name. Value is the list of switches to be used at the end of the command line when invoking the linker to build an executable for the source or for its language. These switches may override the Required_Switches . |
Unconditional_Linking |
Single value, indexed by a language When set for a language, this instructs the link phase to always explicitly link with the produced objects |
Attribute |
Description |
---|---|
Driver |
Single value Value is the name of the linker executable. |
Attribute |
Description |
---|---|
Max_Command_Line_Length |
Single value Value is the maximum number of character in the command line when invoking the linker to link an executable. |
Response_File_Format |
Single value Indicates the kind of response file to create when the length of the linking command line is too large. Only authorized case-insensitive values are none , gnu , object_list , gcc_gnu , gcc_option_list and gcc_object_list . |
Response_File_Switches |
List value, configuration concatenable Value is the list of switches to specify a response file to the linker. |
Attribute |
Description |
---|---|
Body |
Single value, indexed by a unit Index is a unit name. Value is the file name of the body of the unit. |
Body_Suffix |
Single value, indexed by a language Index is a language name. Value is the extension of file names for bodies of the language. |
Casing |
Single value Indicates the casing of sources of the Ada language. Only authorized case-insensitive values are lowercase , uppercase and mixedcase . |
Dot_Replacement |
Single value Value is the string that replace the dot of unit names in the source file names of the Ada language. |
Implementation |
Single value, indexed by a unit Equivalent to attribute Body . |
Implementation_Exceptions |
List value, indexed by a language Index is a language name. Value is a list of bodies for the language that do not necessarily follow the naming scheme for the language and that may or may not be found in the source directories of the project. |
Implementation_Suffix |
Single value, indexed by a language Equivalent to attribute Body_Suffix . |
Separate_Suffix |
Single value Value is the extension of file names for subunits of Ada. |
Spec |
Single value, indexed by a unit Index is a unit name. Value is the file name of the spec of the unit. |
Spec_Suffix |
Single value, indexed by a language Index is a language name. Value is the extension of file names for specs of the language. |
Specification |
Single value, indexed by a unit Equivalent to attribute Spec . |
Specification_Exceptions |
List value, indexed by a language Index is a language name. Value is a list of specs for the language that do not necessarily follow the naming scheme for the language and that may or may not be found in the source directories of the project. |
Specification_Suffix |
Single value, indexed by a language Equivalent to attribute Spec_Suffix . |