26 Commits

Author SHA1 Message Date
Jerome Lambourg
76c10c296d Add the examples from the gprbuild repository
Adjust the project files to properly install them in share/doc

For eng/gpr/gpr-issues#548
2025-03-10 16:16:29 +00:00
Vincent Jicquel
64a4a5d2af Update tests to use the new logs reporter API
Co-Author: Jerome Lambourg <lambourg@adacore.com>
2024-10-03 11:29:25 +00:00
Jerome Lambourg
4ef839c85c Adjust tests after change of API for project loading. 2024-06-01 19:43:04 +02:00
Jerome Lambourg
ba54406d43 Bump copyright notice to 2024
Also remove copyright from tests

no-issue-check
2024-01-10 11:11:21 +01:00
Jerome Lambourg
b7a1d9ad4b Bump copyright year.
Fix eng/gpr/gpr#14
2023-01-02 11:51:43 +01:00
Pierre Béguet
52566ad278 Pack and attribute identifier refactoring in libGPR2
Major change into libGPR2 and GPRTools, all APIs previously
using Attribute_Id and/or Package_Id/Attribute_Id are now
using the combined qualified name Q_Attribute_Id in order
to unify APIs usage.
Few exceptions exist when retriving Attributes from a named
Package.
As Q_Attribute_Id is now used all over libGPR2, the list of
Attribute_Id constants was removed and a list of Q_Attribute_Id
constants can now be found at the same place. This was done
to simplify APIs call by providing defined and registered
attributes qualified name.

V720-027 :
When users are adding attributes without adding a package first
this package is not taken into account when launching Validity_Check.
We cannot make the assumption on which kind of project this package
is authorized to be in, so we are adding a precondition.
We now raise an ASSERTION_ERROR when trying to add an attribute
in a unknown package.

TN: V725-008
TN: V720-027
Change-Id: I3807ac993002c308021f082c7ba034cc371563cc
2022-08-29 07:35:59 +00:00
Fabien Chouteau
bb9b6a7bb3 Change license header of GPR2 library to Apache 2.0
no-precommit-check
This patch is rejected by the "Copyright notice must include current
year" check, we actually want to preserve the copyright years here.

TN: V822-021
Change-Id: Iad42ad0863f12d7a3c714855287c5996581910b6
2022-08-24 15:07:24 +00:00
Philippe Gil
4aae1ece38 remove under development conversion_tutorial example
keep/test dev version in examples test.

TN: V110-019
Change-Id: I06aa6735e60d785f7a771de67358039c5da9fb83
2022-04-04 10:44:54 +02:00
Pascal Obry
66c2f5faf2 Minor reformatting.
no-tn-check

Change-Id: Ia00ed1b478fe8dd7dbfbe4611d5f070409fffea1
2022-04-02 22:52:17 +02:00
Pascal Obry
2a73e45f7e Add support for Lint as a new message category.
no-tn-check

Change-Id: Ie211b7eec068ad953dbbeca3088fe0819a2cfd9e
2022-04-02 22:52:17 +02:00
Philippe Gil
51e411e1b5 move GPR2.Path_Name.GNATCOLL package into GPR2.Path_Name
TN: V114-019
Change-Id: I56bb4adf6114d8d3ec9342eea7a6c5c1092e8c86
2022-04-01 15:17:32 +00:00
Jerome Lambourg
ffe735ad9d Add checks to detect target discrepancies.
Add warnings or errors when:
* --target is specified with an explicit config project. If the config
  target is different it issues an error, else it issues a warning.
* if Target attribute is set and different from the configuration, issue
  a warning.

This change also removes the Target field in the Configuration object, as
it is not used (and wrong when an explicit config project is defined).

Follow-up of V303-028.

Change-Id: If1d232ef3cf38618ccda1d9f8562b08abf85caed
2022-03-22 16:45:30 +01:00
Jerome Lambourg
febff25266 Improve support for FileGlob_Or_Language attribute indexes.
This change, initially just meant to have Switches and Default_Switches
actual aliases, found out issues with handling FileGlob_Or_Language index
casing when the host uses case sensitive fs.

So finally this change modifies the way indexes are defined, removing some
duplicated definitions and now relying on index_type to handle casing.

To differentiate between Languages and FileGlob for attributes accepting
both, a loosy algorithm is defined:
- names with extensions or containing blob special characters [|]*? are
  supposed to be source files or blobs
- other values are supposed to be languages (no casing).

Finally, FileGlob_Or_Language checks for the source's language if no
index matches the source's simple name.

TN: V203-012
Change-Id: I37a54683de2c40bead611fefeae0d65d350e2bca
Depends-On: I8cde580844a5333991316f86aaa460fa2e542979
2022-02-11 16:25:57 +00:00
Jerome Lambourg
74cb3b115f Rename gpr2.project.view.has_packages as has_package
And in the process remove the use case where package name is undefined (this
case is never tested or used).

no-tn-check

Change-Id: I97c4baff5e36617a37911b4e86ff6cf653317f0c
2022-01-25 14:49:21 +01:00
Philippe Gil
58be1b3cce update & test GPR2 examples
TN: V110-019
Change-Id: Idbab19921d42b909b6348f3f6b29afa99bf2de70
2022-01-17 17:10:24 +01:00
Jérôme Lambourg
3ddedc127b Update year in copyright notice
no-tn-check

Change-Id: I6c02538c84e05dd1668a27f673146cc5793a81c5
2022-01-04 09:26:28 +00:00
Philippe Gil
e39e8c2936 add a GNATCOLL.Projects to GPR2 tutorial example
part of T429-011

Change-Id: I381333aa7831f3929b13dabda376e0f8858fa64b
2020-10-08 14:57:06 +02:00
Robin Morier
fb4488f3cb Change all headers to Adacore (2019).
Change-Id: I42bb106e26be87e226a3d202b80d9edc1446afe5
2019-02-12 11:59:41 +01:00
Pascal Obry
cd9952cda6 Rework the attributes representation and iterator.
The new representation allows multiple attribute with the same
name but with different index.

Part of P113-046.

Change-Id: I7566bf69a1b41903b58e63af11c8579a165ea88d
2016-07-18 19:38:04 +02:00
Pascal Obry
1b57e66e5e Rename Language to Index.
Indeed an attribute's index can be a language but it can also be a
filename or a unit name.

Part of P113-046.

Change-Id: I85556e70a6ceb9a01f3ad6b2adcb901672654b9f
2016-03-12 15:16:55 +01:00
Pascal Obry
c6e2a35ea3 Update example to match current implementation.
Part of P113-046.

Change-Id: I9411c6554e5c5d781bd1063251016c800aedbc5e
2016-03-09 12:28:00 +01:00
Pascal Obry
121ff414a9 A project Qualifier is only for the parsed project.
That is the Qualifier is the actual string explicitly placed before
the reserved work project on the source file. Then on a project view
we use the term Kind which is more generic and it may or may not be
the same as the qualifier. The project kind is determined from
looking at the project content if the qualifier is not present.

Part of P113-046.

Change-Id: Idc3128412076af86ca3b386b9e7c3a61f0a725ee
2016-03-09 12:28:00 +01:00
Pascal Obry
f381c70a16 Add support for language based attributes.
Part of P113-046.

Change-Id: I578e0e88537f14c5015e3353cf88a4caf1ab92f4
2016-03-09 12:27:59 +01:00
Pascal Obry
cd477d0f8d Add support for packages.
Part of P113-046.

Change-Id: If41efb01096e60474ac25708b07b2ae5319bfb4b
2016-03-09 12:27:59 +01:00
Pascal Obry
ea29910ef5 Add support for case statement.
Add a corresponding simple example.

Part of P113-046.

Change-Id: I5b7eb97f203fcc44e3bc36dba62bc9d876bd93e7
2016-03-09 12:27:59 +01:00