From 0efd26fe8ecc612b0a36784f38848265e62ff013 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Fri, 29 May 2015 14:11:41 +0000 Subject: Add documentation on depending on precompiled C++ libraries -- MOS_MIGRATED_REVID=94756225 --- site/docs/cpp.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'site/docs/cpp.md') diff --git a/site/docs/cpp.md b/site/docs/cpp.md index 1d32d4eed6..72463d6591 100644 --- a/site/docs/cpp.md +++ b/site/docs/cpp.md @@ -223,3 +223,20 @@ cc_test( ``` You can then use `bazel test` to run the test. + + +Adding dependencies on precompiled libraries +-------------------------------------------- + +If you want to use a library that you only have a compiled version of (e.g., +headers and a .so) wrap it in a `cc_library` rule: + +```python +cc_library( + name = "mylib", + srcs = ["mylib.so"], + hdrs = ["mylib.h"], +) +``` + +Then other C++ targets in your workspace can depend on this rule. -- cgit v1.2.3