Skip to content

[mlir] Exclude CAPI test targets from default build target #96545

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

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

tstellar
Copy link
Collaborator

This helps reduce the build time for users that want to build MLIR, but don't want to run the tests.

This helps reduce the build time for users that want to build MLIR,
but don't want to run the tests.
@llvmbot llvmbot added the mlir label Jun 24, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 24, 2024

@llvm/pr-subscribers-mlir

Author: Tom Stellard (tstellar)

Changes

This helps reduce the build time for users that want to build MLIR, but don't want to run the tests.


Full diff: https://github.com/llvm/llvm-project/pull/96545.diff

1 Files Affected:

  • (modified) mlir/test/CAPI/CMakeLists.txt (+1)
diff --git a/mlir/test/CAPI/CMakeLists.txt b/mlir/test/CAPI/CMakeLists.txt
index 76bd4e60f77b2..ad312764b3e06 100644
--- a/mlir/test/CAPI/CMakeLists.txt
+++ b/mlir/test/CAPI/CMakeLists.txt
@@ -10,6 +10,7 @@ function(_add_capi_test_executable name)
     PARTIAL_SOURCES_INTENDED
     ${ARG_UNPARSED_ARGUMENTS})
   set_target_properties(${name} PROPERTIES FOLDER "MLIR/Tests")
+  set_target_properties(${name} PROPERTIES EXCLUDE_FROM_ALL ON)
 
   llvm_update_compile_flags(${name})
   if(MLIR_BUILD_MLIR_C_DYLIB)

@tstellar
Copy link
Collaborator Author

tstellar commented Jul 2, 2024

Ping.

@tstellar tstellar requested a review from Meinersbur July 2, 2024 23:50
@joker-eph
Copy link
Collaborator

Are they still a dependency of check-mlir-build-only though?

@tstellar
Copy link
Collaborator Author

tstellar commented Jul 3, 2024

Are they still a dependency of check-mlir-build-only though?

Yes, I confirmed this by testing locally. Also, the dependencies for check-mlir-build-only are handled in a separate file:
https://github.com/llvm/llvm-project/blob/main/mlir/test/CMakeLists.txt

@tstellar tstellar merged commit 4f3c9da into llvm:main Jul 8, 2024
9 checks passed
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
This helps reduce the build time for users that want to build MLIR, but
don't want to run the tests.
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.

3 participants