cps-org / cps-org/cps

Case Study: absl_time_zone

Open
#36 7 comments 1 reaction 0 assignees View on GitHub
documentation question
Dominant language
Python
Stars
191
Forks
14
PR merge metrics
No merged PRs in 30d

Description

## Completion Criteria

Documentation about how to practically convert existing CMake and/or pkg-config projects to CPS should be started. It can be iterated on as we gain experience, but sharing lessons learned in discoverable ways is important to new adopters and contributors.

## Background

### Structure

It seems like `absl_time_zone` is an implementation library that installs headers but expects only other `absl` libraries to make use of them, `absl_time` especially. It needs to provide build systems information for discovering headers and libraries to link, of course, but end-users shouldn't be directly referencing this library, so it's an example of a "private" library.

### CMake Metadata

On my Linux machine, `find_package(absl)` in CMake imports dozens and dozens of `IMPORTED` library targets with `absl::` namespace scopes.

For instance, `absl::time_zone` has a `RelWithDebInfo` `IMPORTED` `SHARED` library located at `${_IMPORT_PREFIX}/lib/libabsl_time_zone.so.2308.0.0`.

### `pkg-config` metadata

The relevant `pkg-config` metadata in `/usr/lib/pkgconfig/absl_time_zone.pc` is as follows:

```
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib
includedir=/usr/include

Name: absl_time_zone
Description: Abseil time_zone library
URL: https://abseil.io/
Version: 20230802
Requires:
Libs: -L${libdir} -labsl_time_zone
Cflags: -I${includedir} -DNOMINMAX
```

## Questions

Do we recommend `absl_time_zone.cps` or do we recommend an omnibus `absl.cps` that includes models for each library shipped by the `absl` project?

Should CPS files adopt `RelWithDebInfo` as an explicit default or should it be unqualified like the `pkg-config` metadata?

Is there currently support for "private" libraries like this? If not, should we add a tracking issue?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.