Skip to content

Commit fd1c4c3

Browse files
committed
[gn] port 97dee78 (ClangDocTests config.h)
1 parent 189d5da commit fd1c4c3

File tree

2 files changed

+22
-2
lines changed
  • llvm/utils/gn/secondary/clang-tools-extra

2 files changed

+22
-2
lines changed

llvm/utils/gn/secondary/clang-tools-extra/clang-doc/support/BUILD.gn

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ static_library("support") {
22
output_name = "clangDocSupport"
33
configs += [ "//llvm/utils/gn/build:clang_code" ]
44
deps = [ "//llvm/lib/Support" ]
5-
sources = [ "File.cpp" ]
5+
sources = [
6+
"File.cpp",
7+
"Utils.cpp",
8+
]
69
}

llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
import("//third-party/unittest/unittest.gni")
2+
import("//llvm/utils/gn/build/write_cmake_config.gni")
3+
4+
write_cmake_config("config") {
5+
input = "config.h.cmake"
6+
output = "$target_gen_dir/config.h"
7+
values = [
8+
"CLANG_DOC_TEST_ASSET_DIR=",
9+
]
10+
}
211

312
unittest("ClangDocTests") {
413
configs += [ "//llvm/utils/gn/build:clang_code" ]
514
deps = [
15+
":config",
616
"//clang-tools-extra/clang-doc",
717
"//clang/lib/AST",
818
"//clang/lib/ASTMatchers",
@@ -18,7 +28,14 @@ unittest("ClangDocTests") {
1828
"//llvm/lib/Support",
1929
"//llvm/lib/Testing/Support",
2030
]
21-
include_dirs = [ "//clang-tools-extra/clang-doc" ]
31+
32+
include_dirs = [
33+
"//clang-tools-extra/clang-doc",
34+
35+
# To pick up generated config.h.
36+
target_gen_dir,
37+
]
38+
2239
sources = [
2340
"BitcodeTest.cpp",
2441
"ClangDocTest.cpp",

0 commit comments

Comments
 (0)