Skip to content

Commit 998bdae

Browse files
authored
[MLGO] Only configure tests with LLVM_INCLUDE_TESTS (#121293)
This allows downstream customers to remove all test directories and save quite some space when only building with LLVM_INCLUDE_TESTS=OFF.
1 parent 486ec4b commit 998bdae

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

llvm/utils/mlgo-utils/CMakeLists.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
configure_lit_site_cfg(
2-
"${CMAKE_CURRENT_SOURCE_DIR}/tests/lit.site.cfg.in"
3-
"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg"
4-
)
1+
if(LLVM_INCLUDE_TESTS)
2+
configure_lit_site_cfg(
3+
"${CMAKE_CURRENT_SOURCE_DIR}/tests/lit.site.cfg.in"
4+
"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg"
5+
)
56

6-
add_lit_testsuite(check-mlgo-utils "Running mlgo-utils tests"
7-
${CMAKE_CURRENT_BINARY_DIR}
8-
DEPENDS "FileCheck" "not" "count" "split-file" "yaml2obj" "llvm-objcopy"
9-
)
7+
add_lit_testsuite(check-mlgo-utils "Running mlgo-utils tests"
8+
${CMAKE_CURRENT_BINARY_DIR}
9+
DEPENDS "FileCheck" "not" "count" "split-file" "yaml2obj" "llvm-objcopy"
10+
)
11+
endif()

0 commit comments

Comments
 (0)