Skip to content

Commit ade3bd4

Browse files
DavidSpickettkraj
authored andcommitted
Only build c-index-test when clang tests are included
c-index-test is only used for testing, and it's used in tests that are already guarded by CLANG_INCLUDE_TESTS in clang/CMakeLists.txt. This change enables us to do builds with LLVM_INSTALL_TOOLCHAIN_ONLY=OFF, and CLANG_INCLUDE_TESTS=OFF, which contain the required files to build other bits of llvm-project standalone, but does not include c-index-test which we have no need for. Upstream-Status: Submitted [llvm#151157] Signed-off-by: Ross Burton <[email protected]> Signed-off-by: Khem Raj <[email protected]>
1 parent 48424ac commit ade3bd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/tools/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ create_subdirectory_options(CLANG TOOL)
22

33
add_clang_subdirectory(diagtool)
44
add_clang_subdirectory(driver)
5-
add_clang_subdirectory(apinotes-test)
65
if(CLANG_ENABLE_CIR)
76
add_clang_subdirectory(cir-opt)
87
add_clang_subdirectory(cir-translate)
@@ -23,7 +22,10 @@ if(HAVE_CLANG_REPL_SUPPORT)
2322
add_clang_subdirectory(clang-repl)
2423
endif()
2524

25+
if(CLANG_INCLUDE_TESTS)
26+
add_clang_subdirectory(apinotes-test)
2627
add_clang_subdirectory(c-index-test)
28+
endif()
2729

2830
add_clang_subdirectory(clang-refactor)
2931
# For MinGW/Cygwin we only enable shared library if LLVM_LINK_LLVM_DYLIB=ON.

0 commit comments

Comments
 (0)