Skip to content

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
hahnjo added a commit to hahnjo/root that referenced this pull request Jan 13, 2025
llvm/llvm-project#121293 properly fixes the
mlgo-utils build issue found during the upgrade to LLVM 18.
hahnjo added a commit to root-project/root that referenced this pull request Jan 14, 2025
llvm/llvm-project#121293 properly fixes the
mlgo-utils build issue found during the upgrade to LLVM 18.
qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Feb 7, 2025
Local branch amd-gfx 1f2edbe Merged main:6230f1ba945a into amd-gfx:76cd6fb61a94
Remote branch main 998bdae [MLGO] Only configure tests with LLVM_INCLUDE_TESTS (llvm#121293)
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