rules_foreign_cc/examples
UebelAndre edbfa3bfa9
Restructured rules to match architecture (#555)
* Restructured rules to match architecture

* Added exports of all symbols in the deprecated location for legacy support

* Updated examples
2021-03-12 16:54:14 +00:00
..
cmake_android Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_crosstool Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_defines Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_hello_world_lib Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_hello_world_variant Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_synthetic Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_with_bazel_transitive Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_with_data Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
cmake_working_dir Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
configure_use_malloc Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
configure_with_bazel_transitive Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
deps Restructed examples and enabled more testing (#515) 2021-02-26 20:21:13 +00:00
make_simple Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
ninja_simple Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
third_party Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
toolchains_examples Restructured rules to match architecture (#555) 2021-03-12 16:54:14 +00:00
.bazelignore Restructed examples and enabled more testing (#515) 2021-02-26 20:21:13 +00:00
BUILD.bazel Renamed BUILD files to BUILD.bazel (#540) 2021-03-03 10:08:03 -08:00
README.md Added architecture documentation (#544) 2021-03-09 10:49:13 -08:00
WORKSPACE Enable testing on RBE (#525) 2021-03-09 13:28:28 -08:00

README.md

Rules Foreign CC Examples

Top-Level

Top-level examples should contain no dependencies outside of rules_foreign_cc directly and anything else in it's directory. The directories should be prefixed with the type of rule they're associated with. Eg cmake_with_data (being a cmake_external example) and configure_with_bazel_transitive (being a configure_make example).

Third Party

Examples of building source from outside of rules_foreign_cc should be put in the third_party directory which is an isolated workspace that gets added to rules_foreign_cc_examples as an additional rules_foreign_cc_examples_third_party repository. In general, these are expected to be expensive to build so adding new things here should be done selectively. In the top-level package of this workspace, there are test suites separated by the operating system that all tests need to be registered with. The expected structure of any example in this workspace are as follows:

third_party/lib
├── BUILD.bazel
├── BUILD.lib.bazel
└── lib_repositories.bzl

BUILD.bazel

This file must contain some sort of test that confirms the targets for the external repo can be successfully built and ideally ran. The targets here will need to be registered in the test_suite's found in ./third_party/BUILD.bazel or they will not be ran in CI.

BUILD.lib.bazel

The BUILD file expected to be used in the repository containing the target source code.

lib_repositories.bzl

A file containing a single macro lib_repositories that should define the desired repository and ensure the BUILD.lib.bazel file will correctly be installed when the repository is setup. This macro will need to be loaded and called in third_party/repositories.bzl.