================
@@ -270,14 +270,26 @@ add_subdirectory(lib/CAPI)
 
 if (MLIR_INCLUDE_TESTS)
   add_definitions(-DMLIR_INCLUDE_TESTS)
-  add_custom_target(MLIRUnitTests)
-  set_target_properties(MLIRUnitTests PROPERTIES FOLDER "MLIR/Tests")
-  if (TARGET llvm_gtest)
-    add_subdirectory(unittests)
+  set(mlir_explicit_projects "$CACHE{LLVM_ENABLE_PROJECTS}")
+  if(mlir_explicit_projects STREQUAL "all")
+    set(mlir_explicit_projects ${LLVM_ALL_PROJECTS})
+  endif()
+  if ("mlir" IN_LIST LLVM_ENABLE_PROJECTS AND
+      NOT "mlir" IN_LIST mlir_explicit_projects)
+    # Make test support libraries available to dependent projects without
+    # registering MLIR's own unit and regression tests with check-all.
+    add_subdirectory(test/lib)
----------------
jhuber6 wrote:

Alright, I was just wondering why it needed special handling and if it would 
change anything else.

https://github.com/llvm/llvm-project/pull/221724
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to