[llvm] 998bdae - [MLGO] Only configure tests with LLVM_INCLUDE_TESTS (#121293)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 30 01:32:58 PST 2024
Author: Jonas Hahnfeld
Date: 2024-12-30T10:32:54+01:00
New Revision: 998bdae7f5ce8c5aa31b376592c9693fc95f02e3
URL: https://github.com/llvm/llvm-project/commit/998bdae7f5ce8c5aa31b376592c9693fc95f02e3
DIFF: https://github.com/llvm/llvm-project/commit/998bdae7f5ce8c5aa31b376592c9693fc95f02e3.diff
LOG: [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.
Added:
Modified:
llvm/utils/mlgo-utils/CMakeLists.txt
Removed:
################################################################################
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()
More information about the llvm-commits
mailing list