mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-11-28 08:43:26 +00:00
edbfa3bfa9
* Restructured rules to match architecture * Added exports of all symbols in the deprecated location for legacy support * Updated examples
26 lines
509 B
Python
26 lines
509 B
Python
load("@rules_cc//cc:defs.bzl", "cc_test")
|
|
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
|
|
|
|
filegroup(
|
|
name = "sources",
|
|
srcs = glob(["source_root/**"]),
|
|
)
|
|
|
|
cmake(
|
|
name = "liba",
|
|
lib_source = ":sources",
|
|
# This demonstrates the usage of the working directory:
|
|
# the directory where the "main" CMakeLists.txt file resides.
|
|
working_directory = "cmake_dir",
|
|
)
|
|
|
|
cc_test(
|
|
name = "test_lib",
|
|
srcs = [
|
|
"test_liba.cpp",
|
|
],
|
|
deps = [
|
|
":liba",
|
|
],
|
|
)
|