Commit Graph

31 Commits

Author SHA1 Message Date
Nicolas Boulenguez
031bdcc731 projects: style improvements
Remove the Name variable, which duplicates an attribute.

Replace hardcoded Mains with Name.

Remove transitional Library_Type variable from library projects.

Make explicit that Library_Version is only useful during relocatable
builds.

Compute Library_Version from Library_Name, in case it ever differs
from Name.

Make the list of possible Library_Type values explicit (the
documentation mentions "dynamic").
2022-08-09 12:44:51 +02:00
Nicolas Boulenguez
040e1cc35e projects: explictly qualify as standard or library 2022-08-09 12:44:51 +02:00
Nicolas Boulenguez
d6ac7df083 sqlite: only add C language when sqlite is embedded
The warning about unused language becomes an error when the GPR
library is used directly without gprbuild.
2022-08-09 12:44:11 +02:00
Nicolas Boulenguez
6e04e68d2f sqlite: fix selection of -pthread and/or -sqlite3
Reorder case statements in order to use Sqlite_Lib in a way similar to
the existing Thread_Lib.

When OS /= Windows_NT, GNATCOLL_SQLITE = embedded, LIBRARY_TYPE = relocatable,
Library_Options is now ("-pthread") instead of (),
consistently with Linker'Linker_Options.

When GNATCOLL_SQLITE = external, LIBRARY_TYPE = static,
Library_Options is now () instead of ("-lsqlite3") & Thread_Lib.
These options are intended for the dynamic loader, not the static
archiver (see https://github.com/AdaCore/gnatcoll-db/pull/17).
2022-08-09 12:35:17 +02:00
Nicolas Boulenguez
6c87fb7476 library projects: independent selection of each shared object version 2022-08-09 12:35:10 +02:00
Nicolas Boulenguez
f96aad04cd projects: share settings, inherit build flags, drop unused variables 2022-08-09 12:34:55 +02:00
anisimko
0819d68de5 Remove unused package references
no-tn-check

GNAT style check became more strict.

Change-Id: I24b59f7b3ffdfa58d8a54b3ede6bfa56fbdcc46d
2020-09-14 11:12:41 +06:00
Fabien Chouteau
5bdd20ae4d gnatcoll_*.gpr: rename external GNATCOLL_BUILD into GNATCOLL_BUILD_MODE
To avoid conflict with installed gnatcoll.gpr where GNATCOLL_BUILD means
library type.

Part of S709-037.

Change-Id: I372b3fc7b35faf14a223465069968ff1e5550250
2020-09-10 18:42:36 +02:00
Fabien Chouteau
d9a2231ff0 gnatcoll_*.gpr: rename all external GNATCOLL_*_BUILD into GNATCOLL_BUILD
To have a unified external for all GNATCOLL project, as discussed for
gnatcoll-db.

Part of S709-037.

Change-Id: I5b6c843df6926288b8906a8c285a6d682394d7bf
2020-08-26 18:38:05 +02:00
Fabien Chouteau
b3a055d835 gnatcoll_*.gpr: introduce the GNATCOLL_*_BUILD external
Like for gnatcoll_core, these externals allow gnatcoll_*.gpr to be used
from a project that defines the BUILD external in an incompatible way.

Part of S709-037.

Change-Id: Ib69453688c4c3ea112aa8b00d3a610bdc2f5426f
2020-07-27 16:56:56 +02:00
Fabien Chouteau
afd3bbfb2f gnatcoll.gpr_{postgres|sql|sqlite|xref}: set default LIBRARY_TYPE
Part of T717-016.

Change-Id: Idd60944d984b2cf9c05759a87cd4b4bb8cc8e8b4
2020-07-17 16:46:32 +02:00
anisimko
767216d0e0 Fix sqlite2db issues
* sql/gnatcoll-sql-inspect.adb (Type_From_SQL):
For Field_Mapping_Integer does not interpret 'numeric' without precision and
scale as Integer. Add decimal type processing.
For Field_Mapping_Float interpret 'decimal' and 'numeric' without precision
and scale as Float.

* sqlite/gnatcoll-sql-sqlite-builder.adb (Foreach_Field):
Ignore square brackets in field names. Fix parsing numeric with position and
scale.

* testsuite/tests/db2ada/chinook/*
Testsuite with public database example.

TN: T627-001
Change-Id: I38843e0c1b6be144d19b9f2e7ed118c2bf44e070
2020-06-30 08:02:57 +06:00
anisimko
37cda9383c Fixes in database schema processing
* gnatcoll-sql-inspect.ads (Type_From_SQL):
Considers datetime as Field_Mapping_Timestamp.

* gnatcoll-sql-inspect.adb (Type_From_SQL):
Considers nvarchar as Field_Mapping_Text.
Parsing max length moved into separated routine Process Max_Length.

* sqlite/gnatcoll-sql-sqlite-builder.adb
(Foreach_Table): Fix SQL request over database tables. Takes only
tables and views from the sqlite_master and does not take service
SQLite tables.
(Foreach_Field): Do not interpret as field the FOREIGN/UNIQUE KEY
element in CREATE TABLE statement.

TN: T627-001
Change-Id: Ibb6ca6c6a67489bbe569c0c0b1aed2e5a9cd4b34
2020-06-27 15:54:18 +02:00
Vasiliy Fofanov
c067251840 Fix various typos and headers, bump copyright.
Motivated by github PR #14. no-tn-check

Change-Id: I866431c55fe0937f348d08cd8a188eb40fc8f061
2020-06-12 19:29:25 +02:00
Vasiliy Fofanov
6d85dd1e76 Update copyright headers (no-tn-check)
Change-Id: Ie0bb124d3b360c37372f10ce8645af35a08fc03a
2019-05-28 18:48:19 +02:00
Nicolas Roche
5833393ca7 Add support for GPR_OPTIONS variable
Change-Id: I966b63e1062a5465afacac710b46431dc0111cb7
2018-05-23 11:52:19 -04:00
Pierre-Marie de Rodat
22f18fb3b2 Disable parallelism in Makefiles
(no-tn-check)

Change-Id: Iccd88aad5fa9a3e2e8b61ed060d7cb1f0549f8bb
2018-05-09 16:21:59 +02:00
Dmitriy Anisimkov
b66441cce0 Create body for some expression functions
R411-015

Because GNAT became checking unreferenced parameter for expression functions
but did not provide a way to mark it unchecked in this state.

Change-Id: I8b5b65bb2701a989dd000aeb56290322c982a61e
2018-04-12 10:19:57 +02:00
Dmitriy Anisimkov
5a40249df9 Move GNATCOLL.SQL from gnatcoll-core
R314-019

Change-Id: I3c91eb31c5f93b632dccb4f16bafe498dbeaf7de
2018-03-28 19:07:56 +06:00
Nicolas Roche
01b7285c4e Fix path to version_information
Part of R314-020

Change-Id: I56ab27fa0e32b27f269f2c94b2fe688fba457849
2018-03-20 10:36:14 -04:00
Dmitriy Anisimkov
7ff0255592 Add db2ada routine for all available DB backends
Change-Id: Idcc8bbac22b110bdab8f204529ee5b26d90c6d55
2018-02-22 00:14:24 +06:00
Nicolas Roche
2657412398 Don't use gnatcoll.OS value.
This is causing crash of gprbuild.

Change-Id: I5e997681e141989140ca254e290910c8d3dc4f64
2018-02-09 12:32:37 +01:00
Vadim Godunko
4247e9ce0c QB01-037 Set library kind for libgpr.
Change-Id: Iffb6a6eca2c3ef76c6de5d2caa96bc8ddfe95ceb
2018-02-07 10:54:38 +01:00
Dmitriy Anisimkov
1a3c092061 SQLite callback helping to find locking problem
R110-010

Change-Id: I1034afb9624eb25bd48f42dae8ee7637f255af21
2018-02-07 08:59:01 +01:00
Nicolas Roche
6b6f9b4d4b Remove dependency on readline in gnatinspect
GNATinspect was always compiled with dummy stubs to readline.

Part of R206-028
Change-Id: I504461e0262e0a38010681a323295c29c7c7d8ec
2018-02-06 14:41:49 +01:00