Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLGO] Only configure tests with LLVM_INCLUDE_TESTS #121293

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

hahnjo
Copy link
Member

@hahnjo hahnjo commented Dec 29, 2024

This allows downstream customers to remove all test directories and save quite some space when only building with LLVM_INCLUDE_TESTS=OFF.

This allows downstream customers to remove all test directories and
save quite some space when only building with LLVM_INCLUDE_TESTS=OFF.
@llvmbot
Copy link
Member

llvmbot commented Dec 29, 2024

@llvm/pr-subscribers-mlgo

Author: Jonas Hahnfeld (hahnjo)

Changes

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 --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()

@hahnjo hahnjo merged commit 998bdae into llvm:main Dec 30, 2024
10 checks passed
@hahnjo hahnjo deleted the mlgo-utils-tests branch December 30, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants