mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
A cmake generator in bazel is introduced allowing to import the Swift extractor as a CMake project while keeping Bazel files as the source of truth for the build. Using the CMake project: * requires bazel and clang to be installed and available on the command line * does not require a previous bazel build, however * will require a CMake reconfiguration for changes to generated code (like changes to the schema)
23 lines
494 B
Python
23 lines
494 B
Python
load("//swift:rules.bzl", "swift_cc_binary")
|
|
load("//misc/bazel/cmake:cmake.bzl", "generate_cmake")
|
|
|
|
swift_cc_binary(
|
|
name = "extractor",
|
|
srcs = glob([
|
|
"*.h",
|
|
"*.cpp",
|
|
]),
|
|
visibility = ["//swift:__pkg__"],
|
|
deps = [
|
|
"//swift/extractor/infra",
|
|
"//swift/extractor/remapping",
|
|
"//swift/extractor/visitors",
|
|
"//swift/tools/prebuilt:swift-llvm-support",
|
|
],
|
|
)
|
|
|
|
generate_cmake(
|
|
name = "cmake",
|
|
targets = [":extractor"],
|
|
)
|