apple / apple/foundationdb

Add more cmake options

Open
#5,218 3 comments 0 reactions 1 assignee Claimed by @sfc-gh-mpilman View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

I'm working on packaging FoundationDB for [Exherbo](https://exherbo.org/), an source based Linux distribution. My goal is to create a package with multiples options(similar to [USE flags in Gentoo](https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/USE)), to allow developers to carefully choose what they need, for example:

* using the `client` option will build the `C API`,
* using the `server` option will build `fdb{server,monitor,backup}`),
* using the `systemd` option will a systemd service,
* using the `java-bindings` option will build the java-bindings,
* and so on...

Currently, when pulling the master branch, almost everything is build by default, resulting in a lot of compile time and needed dependencies why may not be necessary for the end user. The only dependencies that can be removed are:

* [RocksDB through the `-DSSD_ROCKSDB_EXPERIMENTAL` flag](https://github.com/apple/foundationdb/blob/master/cmake/FDBComponents.cmake#L120),
* [TLS](https://github.com/apple/foundationdb/blob/master/cmake/FDBComponents.cmake#L23).

Adding more [cmake options](https://cmake.org/cmake/help/latest/command/option.html) will allow users to carefully select what they want to build. This will also lower compile time in certain cases and ease package creation.

I was thinking adding options to:

* the bindings,
* fdbclient,
* fdbserver,
* fdbcli,
* fdbmonitor/fdbservice,
* fdbbackup

Most of these bindings targets already have [boolean](https://github.com/apple/foundationdb/blob/master/cmake/FDBComponents.cmake#L163-L171), which can be easily exported as cmake options. I would like to do the same for binaries as well, to allow building only the `C API` for example.

The new options will have `TRUE` as a default for compatibility with the current builds.

Are you interested in such a contribution? May it also target the `release-7.0` branch?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.