2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-12-03 02:52:58 +00:00
rules_foreign_cc/examples/cmake_working_dir/BUILD.bazel
UebelAndre f307e857f6
Renamed cmake_external to cmake (#539)
* Renamed `cmake_external` rule to `cmake`

* Updated examples
2021-03-09 10:55:01 -08:00

26 lines
516 B
Python

load("@rules_cc//cc:defs.bzl", "cc_test")
load("@rules_foreign_cc//tools/build_defs:cmake.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",
],
)