Skip to content

Commit

Permalink
[MLGO] Only configure tests with LLVM_INCLUDE_TESTS (#121293)
Browse files Browse the repository at this point in the history
This allows downstream customers to remove all test directories and save
quite some space when only building with LLVM_INCLUDE_TESTS=OFF.
  • Loading branch information
hahnjo authored Dec 30, 2024
1 parent 486ec4b commit 998bdae
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions llvm/utils/mlgo-utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
configure_lit_site_cfg(
"${CMAKE_CURRENT_SOURCE_DIR}/tests/lit.site.cfg.in"
"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg"
)
if(LLVM_INCLUDE_TESTS)
configure_lit_site_cfg(
"${CMAKE_CURRENT_SOURCE_DIR}/tests/lit.site.cfg.in"
"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg"
)

add_lit_testsuite(check-mlgo-utils "Running mlgo-utils tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS "FileCheck" "not" "count" "split-file" "yaml2obj" "llvm-objcopy"
)
add_lit_testsuite(check-mlgo-utils "Running mlgo-utils tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS "FileCheck" "not" "count" "split-file" "yaml2obj" "llvm-objcopy"
)
endif()

0 comments on commit 998bdae

Please sign in to comment.