[manifest]
name = openr
fbsource_path = facebook/openr
shipit_project = openr
shipit_fbcode_builder = true

[git]
repo_url = https://github.com/facebook/openr.git

[build.os=linux]
builder = cmake
# openr files take a lot of RAM to compile.
job_weight_mib = 3072

[build.not(os=linux)]
# boost.fiber is required and that is not available on macos.
builder = nop

[github.actions]
# openr uses a 4-core runner, so allow extra build time.
timeout_minutes = 120

# `full` preserves the complete Open/R build. `exported_libraries` installs
# these component libraries:
# - openr_constants
# - openr_fbnl
# - openr_network_util
# - openr_system_metrics
# It also installs these generated Thrift libraries:
# - routing_policy_cpp2
# - openr_config_cpp2
# - network_cpp2
# - platform_cpp2
# - kv_store_cpp2
# - types_cpp2
# - openr_ctrl_cpp2
# Public Open/R/common headers and Thrift definitions are included. Open/R
# daemons, tools, tests, and unrelated libraries are omitted.
# Consumers select the narrow profile with:
# `openr = !default, !full, exported_libraries`
[features]
default = full
full =
exported_libraries =

[cmake.defines.all(feature_full=off,feature_exported_libraries=on)]
OPENR_BUILD_PROFILE=exported_libraries

# Include the profile in the dependency hash so an existing scratch directory
# cannot reuse an Open/R build made with a different target set.
[depends.environment]
OPENR_BUILD_PROFILE

[dependencies]
boost
fb303
fbthrift
folly
googletest
re2
range-v3

[dependencies.all(distro_family=rhel,distro_vers=9)]
gcc12

[cmake.defines.all(distro_family=rhel,distro_vers=9)]
CMAKE_C_COMPILER=/opt/rh/gcc-toolset-12/root/usr/bin/gcc
CMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-12/root/usr/bin/g++

[cmake.defines.test=on]
BUILD_TESTS=ON
ADD_ROOT_TESTS=OFF

[cmake.defines.test=off]
BUILD_TESTS=OFF


[shipit.pathmap]
fbcode/openr = openr
fbcode/openr/public_tld = .
