[llvm] [MLGO] Only configure tests with `LLVM_INCLUDE_TESTS` (PR #121293)
Jonas Hahnfeld via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 29 05:15:32 PST 2024
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/121293
This allows downstream customers to remove all test directories and save quite some space when only building with `LLVM_INCLUDE_TESTS=OFF`.
>From e0d5d5f04dd8591100ba5b54d20ea3d3c8a08464 Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <jonas.hahnfeld at cern.ch>
Date: Sun, 29 Dec 2024 12:51:09 +0100
Subject: [PATCH] [MLGO] Only configure tests with LLVM_INCLUDE_TESTS
This allows downstream customers to remove all test directories and
save quite some space when only building with LLVM_INCLUDE_TESTS=OFF.
---
llvm/utils/mlgo-utils/CMakeLists.txt | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
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