[llvm] [MLGO] Only configure tests with `LLVM_INCLUDE_TESTS` (PR #121293)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 29 05:16:08 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlgo
Author: Jonas Hahnfeld (hahnjo)
<details>
<summary>Changes</summary>
This allows downstream customers to remove all test directories and save quite some space when only building with `LLVM_INCLUDE_TESTS=OFF`.
---
Full diff: https://github.com/llvm/llvm-project/pull/121293.diff
1 Files Affected:
- (modified) llvm/utils/mlgo-utils/CMakeLists.txt (+10-8)
``````````diff
diff --git a/llvm/utils/mlgo-utils/CMakeLists.txt b/llvm/utils/mlgo-utils/CMakeLists.txt
index 2f3920644b737b..d9b2bdc9bf60a9 100644
--- a/llvm/utils/mlgo-utils/CMakeLists.txt
+++ b/llvm/utils/mlgo-utils/CMakeLists.txt
@@ -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()
``````````
</details>
https://github.com/llvm/llvm-project/pull/121293
More information about the llvm-commits
mailing list