Running a:
alr init --in-place --lib some_library
generates the following:
for Object_Dir use "obj";
type Library_Type_Type is ("relocatable", "static", "static-pic");
Library_Type : Library_Type_Type :=
external ("SOME_LIBRARY_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static"));
for Library_Kind use Library_Type;
The GNAT Project Manager Reference Manual 1 has this to say when we want to
build multiple library types ("relocatable", "static", "static-pic") in one
place:
If you need to build both a static and a dynamic library, we recommend using
two different object directories, since in some cases some extra code needs to
be generated for the latter. For such cases, one can either define two different
project files, or a single one that uses scenarios to indicate the various kinds
of library to be built and their corresponding object_dir.
With one of the solutions being appending a subdir to build (example from RM modified a bit):
project Build is
for Library_Dir use "lib/" & Library_Type;
for Object_Dir use "obj/" & Library_Type;
end Build;
Wouldn't it be better for alr init --lib
to generate a library project that
can create multiple library types at the same time as shown in the RM?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too